diff --git a/README.md b/README.md index 072761e5794dd67c129d1217868e21186e60e9cd..2e053afbef6c8e2f91227b24da5b40c79619b29e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ # Helper utilities and scripts Different helpful utilities and scripts + +- `init_key.sh` : edit and run this to initialize a ssh key, eg for handling repositories without necessity to type in passwords each time diff --git a/init_key.sh b/init_key.sh new file mode 100755 index 0000000000000000000000000000000000000000..54bd3727a58e27d209541adb38f4ebbf80e43f1d --- /dev/null +++ b/init_key.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# handling ssh keys +# execute this with "source ${PATH_TO_SCRIPT}/init_key.sh + +# plug here your key name, eg "id_rsa" +SSH_KEY_NAME="" + +if [ -z "$SSH_AUTH_SOCK" ] +then + eval `ssh-agent -s` + ssh-add ~/.ssh/${SSH_KEY_NAME} +fi +