Reputation: 13862
I am using chef and no matter how hard I try, no matter getting my proper ssh files, git still asks for my username.
How can I set it up such that it always has my username?
git data_bag_item("users", "deployer")["home"] do
repository "https://github.com/vvvv/vvvvvvvvvvv"
user data_bag_item("users", "deployer")["username"]
ssh_wrapper "ssh -i #{data_bag_item('users', 'deployer')['home']}/.ssh/git_user_rsa" #the path to our private key file
timeout 10
end
Upvotes: 0
Views: 63
Reputation: 37620
You are using an https
URL with ssh_wrapper
, which makes little sense.
Upvotes: 1
Reputation: 54251
ssh_wrapper
needs to be the path to a script, not a command like that. You can either write out that script using a template resource or you could skip the $GIT_SSH
bit and write out a .ssh/config
file to the correct user with the needed config options. Also remember you'll probably want to disable host-key checking for non-interactive situations.
Upvotes: 1