0

I am using git in my development environment.

When I run the command git pull origin master is there any way to pass the passphrase from the command line.

1 Answer 1

1

You should be using an agent for this so that you only need enter your passphrase once.

2
  • I followed the link and included the password in my ssh agent. Now, I am able to run the command "git pull origin master" and I am able to update my code base. The problem is if my put that command in a shell script and try to execute the script I am getting the following error. Permission denied (publickey). fatal: The remote end hung up unexpectedly My Shell script contains the following lines su nanda -c "cd /var/www/vhosts/apps.mydomains.com/subdomains/nanda/httpdocs/ib_test; git pull origin master" Is anything I am missing here ?
    – Supratik
    Oct 5, 2010 at 12:32
  • @Supratik: Access to an agent is restricted to the user that started the agent (via permissions on the named socket in the SSH_AUTH_SOCK environment variable). The pull running as nanda can not access your agent. You might be able to use the referenced keychain script (which has since moved to funtoo and github) to maintain an agent for your nanda user. Or, pull under your user and let nada access a local “clone” repository, or maybe give nanda an unencrypted key (ick) that can access origin. Nov 23, 2010 at 10:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .