Re: [git-users] git and sudo

2013-09-20 Thread Konstantin Khomoutov
On Thursday, September 19, 2013 11:20:30 PM UTC+4, John McKown wrote: Are you using Linux as a system and ssh as the transport? If so , then perhaps you can try putting the command: export GIT_SSH=ssh -i ${HOME}/.ssh/id_rsa before you do your sudo command. The -i ${HOME}/.ssh/id_rsa

[git-users] git and sudo

2013-09-19 Thread jon heckman
I have a ruby script that interacts with git heavily. I run the entire script in sudo -E (this is needed for reasons other than git) I can do git checkout {branch} just fine. However I get asked for the root@git... password when I try to fetch. I tried using su to make it work but it still asks

Re: [git-users] git and sudo

2013-09-19 Thread John McKown
Are you using Linux as a system and ssh as the transport? If so , then perhaps you can try putting the command: export GIT_SSH=ssh -i ${HOME}/.ssh/id_rsa before you do your sudo command. The -i ${HOME}/.ssh/id_rsa points to the ssh key file to use. Because you use the -E switch on the sudo