tiistai 5. tammikuuta 2016

Git on windows, ssh agent. Do you hate typing git password?

If you are using git bash for windows it will ask you every single time password when you connect to github or similar. Use commands below in your bash terminal to start ssh-agent and add your key to keyring file. ssh-add will ask your git password for private key but after that it wont ask your password anymore!

eval `ssh-agent -s`
if above doesn't start ssh-agent try:

eval $(ssh-agent)
To start the ssh-agent automatically every single time you open your git bash do the following:

create file named .bashrc with the dot to your user home folder. c:\users\username

to bashrc file type: 

eval `ssh-agent -s`
Then go to your home folder and find hidden .ssh folder. There create file named config
To config file type:

ForwardAgent yes
After this your bash will never ask git password until you close the session.

Originally explained here:

Ei kommentteja:

Lähetä kommentti