7

Okay folks, noob RSA question here.

I have a production server, and I've generated an rsa key there. I've then taken the public key (id_rsa.pub) and given that to github, as a deploy key I believe.

What I'm trying to do is automate a deployment script that'll run a 'git pull' on the server. However, every time I run 'git pull' it asks me for my password.

Is there any way to make it so it doesn't ask for the password every time? The specific line is:

Enter passphrase for key '~/.ssh/id_rsa': 

Am I misunderstanding something here?

thekevinscott
  • 185
  • 1
  • 7

1 Answers1

6

You've put a passphrase on your local key. You need to either remove the passphrase (not really recommended unless it's a single-use keypair) or run a user-agent that will essentially 'remember' that you've decrypted the key once and not ask you to do so again. ssh-agent is the one that comes with openssh. The usual procedure is to set up ssh-agent to autostart at login.

Github has a decent, if a bit minimal, tutorial on it.

pjz
  • 10,497
  • 1
  • 31
  • 40
  • Okay, so according to googled materials, I do: "ssh-agent bash", enter my password, then do "ssh-add". And then no more password. But if I log out, I need to do this again. Is there a better tutorial then the ones I'm finding on how to get through ssh-agent? – thekevinscott Jul 07 '10 at 18:27
  • What operating system/distribution are you running? Might be a more automatic and convenient ssh-agent solution available. – andol Jul 13 '10 at 15:07