Created
March 29, 2013 20:14
-
-
Save JamesSwift/5273325 to your computer and use it in GitHub Desktop.
I was having trouble initiating the `ssh-agent` on Git Bash (Git for Windows) in my `.bashrc` file using the example provided at: https://help.github.com/articles/working-with-ssh-key-passphrases So I created a simple script that does the job. It initiates a ssh-agent when you open Git Bash, and kills it when you close the bash. Note, it doesn't…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
#Start ssh-agent | |
eval `ssh-agent` | |
#Uncomment the next line if you want to automatically load ssh-keys at startup | |
#ssh-add | |
#Kill ssh-agent when we close the shell | |
trap "ssh-agent -k" EXIT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment