QUICK GIT SSH WINDOWS PASSWORD TIP

Using Git Bash on Windows I'm always prompted for my SSH password when I interact with Github. I don't get this on Ubuntu as it manages my password for me in it's keyring (I assume Mac has something similar).

I dug around and you can apparently hack up Putty/Plink but honestly I was too lazy to do that.

A simpler solution is to add a few lines to your .bashrc file.

I'm on Windows 8 and this file lives in:

C:\Users\Jim\.bashrc

If you don't have this file create one. This can be a pain in Windows because of the leading dot but you can create it within the Git Bash by simply doing:

touch .bashrc

Now crack open that file with your favorite editor and add the following:

# ask for ssh password only once
eval `ssh-agent`
ssh-add

Now when you initially open Git Bash you will prompted for your SSH password. Once. As I usually have my terminal open all day this eliminates the need to re-enter my password constantly.

Published on Friday, March 14 2014    

COMMENT / SHARE

About

Jim is a Senior Applications Engineer working at Red Hat. He slso likes motorcycles and keeping his quadcopter out of trees.