-1

I've followed the following guide to setup SSH keys on Mac OS 10.7.4.

https://help.github.com/articles/generating-ssh-keys

But for some reason it continually prompts me for my passphrase. It doesn't prompt me if I don't specify a passphrase, but that isn't desired. Is there a way to cache my passphrase so that I won't be prompted for every pull/push?

Phillip Whisenhunt
  • 1,285
  • 2
  • 18
  • 30
  • Where is it that you dont want to be prompted for a passphrase? When generating an ssh key? – Greg Guida Feb 07 '13 at 17:33
  • Has this been resolved? Did you follow the instructions at [Generating SSH Keys](https://help.github.com/articles/generating-ssh-keys#platform-mac) exactly? See also [Git push requires username and password](http://stackoverflow.com/q/6565357/456814). –  Apr 28 '14 at 01:01

4 Answers4

4

You have to add your key file in the ssh-add

ssh-add ~/.ssh/you_key_rsa

After that, it's not will ask any more.

Abdala Cerqueira
  • 1,321
  • 1
  • 10
  • 12
0

You might need to edit the .git/config file in your git repo and change the url value to use something like user@host:path-to-git-repo.git

Teddy
  • 18,357
  • 2
  • 30
  • 42
0

The SSH password is used to authenticate users connecting to GIT repositories. If you're working localy, git shouldn't ask for passwords, obly when doing remote operation, such as clone, push, pull,etc.

If the password annoys you, you can just input a blank password when creating the SSH key, password is not mandatory, however I advise you to use password for extra protection.

stdcall
  • 27,613
  • 18
  • 81
  • 125
0

I am using Windows 10, and I have found two ways to eliminate the passphrase prompting.

  1. Make sure the ssh agent is started and you have added your key

    $ eval "$(ssh-agent -s)"
    
    $ ssh-add ~/.ssh/id_rsa
    

The second command will prompt you for your passphrase, and then you will not be prompted for any other git commands run in this session.
You will need to run these commands again for every new bash session

  1. Remove the passphrase from you key file:

     $ ssh-keygen -p -f ~/.ssh/id_rsa
    

When prompted, just strike enter key for the new passphrase.

Option 2 will permanently remove the passphrase for all git commands. Of course it also makes you key file "unsecured"

Note: If you are using git desktop GUI ( Version 1.04+) Option 2 is required for the GUI to work.