commit by to_remotes 2023-09-20 12:29:09 +0200 from vmdevhw
parent
2bea40e54d
commit
c0f6328c6f
30
init.sh
30
init.sh
|
|
@ -39,27 +39,31 @@ if [ -d "$WA_REPO" ]; then
|
|||
else
|
||||
echo -n "client name: "
|
||||
read -r CLIENT_NAME
|
||||
echo "create ssh key"
|
||||
echo -n "ssh passphrase: "
|
||||
|
||||
stty_orig=$(stty -g) # save original terminal setting.
|
||||
stty -echo
|
||||
read -r passphrase
|
||||
stty "$stty_orig" # restore terminal setting.
|
||||
if [ -z $HOME/.ssh/deploy_key ]; then
|
||||
|
||||
echo "create ssh key"
|
||||
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 " "
|
||||
echo "firefox https://git.service.wiseadvice.eu/user/settings/keys"
|
||||
echo " "
|
||||
|
||||
cat $HOME/.ssh/deploy_key.pub
|
||||
cat $HOME/.ssh/deploy_key.pub
|
||||
fi
|
||||
|
||||
echo " "
|
||||
echo -n "ready to pull? type yes: "
|
||||
|
|
|
|||
Loading…
Reference in New Issue