Quantcast
Channel: Oded Coster – OdedCoster.com/blog
Viewing all articles
Browse latest Browse all 19

GitHub for windows – git bash – remembering the passphrase

$
0
0

I seem to hit this issue every time I setup GitHub for Windows on a new machine.

I setup my SSH connection to the git server, but every single time I use git over the SSH transport, I need to re-enter my passphrase.

After finding and trying a few different solutions, this is what worked for me:

  1. Create a .bashrc file in your home directory (the %USERPROFILE% environement variable).
  2. Add the following lines in it:
    #!/bin/bash
    eval $(ssh-agent)
    ssh-add
    

Start a git bash session – you will be asked for your passphrase once, at the start, and no more.

Using eval 'ssh-agent' did not work for me (and strictly speaking the #!/bin/bash is not needed).

Would love to hear about better alternatives / ways to achieve this.


Viewing all articles
Browse latest Browse all 19

Trending Articles