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
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
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