diff --git a/common_lib.sh b/common_lib.sh index c1022d0..7667f45 100644 --- a/common_lib.sh +++ b/common_lib.sh @@ -13,7 +13,7 @@ function init_repos(){ echo -n "deploy key suffix. Leave blank if first: " read -r DEPLOY_KEY_SUFFIX - if [ ! -f $HOME/.ssh/deploy_key$DEPLOY_KEY_SUFFIX ]; then + if [ ! -f $HOME/.ssh/deploy_key ]; then echo "create ssh key" echo -n "ssh passphrase: " @@ -28,7 +28,7 @@ function init_repos(){ mkdir -p $HOME/.ssh - ssh-keygen -t rsa -N "$passphrase" -C "deploy_key_$CLIENT_NAME" -f $HOME/.ssh/deploy_key$DEPLOY_KEY_SUFFIX + ssh-keygen -t rsa -N "$passphrase" -C "deploy_key_$CLIENT_NAME$DEPLOY_KEY_SUFFIX" -f $HOME/.ssh/deploy_key echo "please upload now pub key by logging into user $CLIENT_NAME keys ..." echo "if user does not exit. login with admin user and create new user with name: $CLIENT_NAME" @@ -38,7 +38,7 @@ function init_repos(){ echo "https://git.service.wiseadvice.eu/user/settings/keys" echo " " - cat $HOME/.ssh/deploy_key$DEPLOY_KEY_SUFFIX.pub + cat $HOME/.ssh/deploy_key.pub fi echo " " @@ -58,7 +58,7 @@ function init_repos(){ cat <> $HOME/.ssh/config Host git.service.wiseadvice.eu HostName git.service.wiseadvice.eu - IdentityFile ~/.ssh/deploy_key$DEPLOY_KEY_SUFFIX + IdentityFile ~/.ssh/deploy_key Port 8422 IdentitiesOnly yes EOT