فهرست منبع

Github SSH integration

Andrea Pollastri 5 سال پیش
والد
کامیت
c9ea811af4
2فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 2 3
      storage/app/scripts/hostadd.sh
  2. 1 0
      storage/app/scripts/install.sh

+ 2 - 3
storage/app/scripts/hostadd.sh

@@ -360,10 +360,9 @@ fi
 
 
 #GIT INIT
 #GIT INIT
 if [ "$AUTO_INSTALL" = "git" ]; then
 if [ "$AUTO_INSTALL" = "git" ]; then
-    ssh-keygen -t rsa -f /home/$USER_NAME/git/deploy -q -P ""
-    chown -R $USER_NAME:$USER_NAME /home/$USER_NAME/git/
-    sudo cp /home/$USER_NAME/git/deploy.pub /home/$USER_NAME/deployment_key.pub
+    sudo cp /cipi/github.pub /home/$USER_NAME/deployment_key.pub
     sudo cp /cipi/deploy.sh /home/$USER_NAME/deploy.sh
     sudo cp /cipi/deploy.sh /home/$USER_NAME/deploy.sh
+    chown -R $USER_NAME:$USER_NAME /home/$USER_NAME/git/
     sudo rpl -i -w "###CIPI-USER###" "$USER_NAME" /home/$USER_NAME/deploy.sh
     sudo rpl -i -w "###CIPI-USER###" "$USER_NAME" /home/$USER_NAME/deploy.sh
 fi
 fi
 
 

+ 1 - 0
storage/app/scripts/install.sh

@@ -387,6 +387,7 @@ echo -e "\n"
 #GIT INSTALL
 #GIT INSTALL
 sudo apt-get update
 sudo apt-get update
 sudo apt-get -y install git
 sudo apt-get -y install git
+sudo ssh-keygen -t rsa -b 4096 -C "git@github.com" -f /cipi/github
 clear
 clear
 echo "GIT installation: OK!"
 echo "GIT installation: OK!"
 sleep 3s
 sleep 3s