Reputation: 11084
I've been looking at a few different SO posts and other forums for an explanation of how to prevent git from constantly asking for my password whenever I interact with my remote repository, but all I understood was that I need to create ssh key.
Upvotes: 8
Views: 7908
Reputation:
If you want to make your private key more secure, a passphrase is used to encrypt it. You can actually use ssh-agent
to store your passphrase once for a terminal/console session, so you don't have to keep entering it all the time.
You'll need to use eval `ssh-agent -s`
to start the agent, ssh-add to enter your passphrase for your private key, and then ssh-agent -k
to kill the agent when you're done. It even comes with a timeout, ssh-add -t <timeout>
, where <timeout>
can be something like Xh
for X hours, Xm
for X minutes, and so on.
ssh-agent
is available on msysGit and Cygwin. I'm not sure about its availability on other platforms like Unix/Linux/*nix systems and Apple OSX.
You can read more about ssh-agent
usage from this Stack Overflow answer and this Stack Overflow answer, as well as googling around for instructions online.
Upvotes: 10
Reputation: 203
Create an SSH Key but don't enter a passphrase when it asks you to
https://help.github.com/articles/generating-ssh-keys
^ In step two of that article just press enter when it asks for a password
Upvotes: 7