Last active
December 16, 2015 15:59
-
-
Save JonathanMH/5459606 to your computer and use it in GitHub Desktop.
short test if your ssh key file is added for use with git
This file contains hidden or 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 | |
# to automatically add a key you can use the following: | |
mac_key_path='/Users/hb/.ssh/foobar' | |
linux_key_path='/home/username/.ssh/foobar' | |
# uncommend below | |
# ssh-add $mac_key_path | |
# ssh-add $linux_key_path | |
echo 'listing ssh-identities: ' | |
ssh-add -l | |
echo '' | |
echo 'if your key did not show up, add them with' | |
echo '`ssh-add ~/.ssh/keyname`' | |
echo 'without the .pub, you will be prompted for a password' | |
echo 'for more info type' | |
echo '`ssh-add --help`' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment