I cannot figure out how to connect to GitHub from my server (e.g., git pull) without ever needing to enter my password. I have followed all the passwordless setup steps as mentioned in this superuser post and GitHub's instructions, but it requires me to run these steps each time I login:

eval `ssh-agent`

It then prompts for my passphrase, adds a id_rsa and id_dsa identity, and then remembers my password for that session. When I re-login, I need to repeat the above steps. I login to my server like ssh -p xxxx user@server.ip (passwordless)

When I git pull the same repo from my Mac, I am not prompted.

How do I get it to never prompt me from my server?

  • I should point out that I'm looking for help for this on my linux / web server (not my Mac). Also, I do not want to use a key without a password. – Joe Fletcher Mar 16 '13 at 18:29

Typically you would use something like Keychain to reattach to an existing ssh-agent. I believe there are also other random scripts floating around on the net that perform this function.

An alternative, if you aren't too worried about your key getting stolen, is to generate an SSH key pair specifically for GitHub and just hit Enter when it asks you for a password (thus, the key will have no password on it). In that case, SSH will never prompt you for a password when using that key. (Note: Even if that key does get stolen, the impact would be limited to GitHub.)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.