5
0
Fork 0

commit by to_remotes 2023-09-20 12:29:09 +0200 from vmdevhw

main
Holger Wasem 2023-09-20 12:29:09 +02:00
parent 2bea40e54d
commit c0f6328c6f
1 changed files with 17 additions and 13 deletions

30
init.sh
View File

@ -39,27 +39,31 @@ if [ -d "$WA_REPO" ]; then
else else
echo -n "client name: " echo -n "client name: "
read -r CLIENT_NAME read -r CLIENT_NAME
echo "create ssh key"
echo -n "ssh passphrase: "
stty_orig=$(stty -g) # save original terminal setting. if [ -z $HOME/.ssh/deploy_key ]; then
stty -echo
read -r passphrase echo "create ssh key"
stty "$stty_orig" # restore terminal setting. echo -n "ssh passphrase: "
stty_orig=$(stty -g) # save original terminal setting.
stty -echo
read -r passphrase
stty "$stty_orig" # restore terminal setting.
echo "1. client name: $CLIENT_NAME" echo "1. client name: $CLIENT_NAME"
mkdir -p $HOME/.ssh mkdir -p $HOME/.ssh
ssh-keygen -t rsa -N "$passphrase" -C "deploy_key_$CLIENT_NAME" -f $HOME/.ssh/deploy_key ssh-keygen -t rsa -N "$passphrase" -C "deploy_key_$CLIENT_NAME" -f $HOME/.ssh/deploy_key
echo "please upload now pub key bay logging into user $CLIENT_NAME keys ..." echo "please upload now pub key bay logging into user $CLIENT_NAME keys ..."
echo "firefox https://git.service.wiseadvice.eu/user/settings/keys" echo "firefox https://git.service.wiseadvice.eu/user/settings/keys"
echo " " echo " "
cat $HOME/.ssh/deploy_key.pub cat $HOME/.ssh/deploy_key.pub
fi
echo " " echo " "
echo -n "ready to pull? type yes: " echo -n "ready to pull? type yes: "