Browse Source

setup credentials

master
arcolinuxz 3 years ago
parent
commit
6e50432e2e
  1. 85
      setup-our-git-credentials.sh

85
setup-our-git-credentials.sh

@ -1,5 +1,14 @@
#!/bin/bash #!/bin/bash
# #
#tput setaf 0 = black
#tput setaf 1 = red
#tput setaf 2 = green
#tput setaf 3 = yellow
#tput setaf 4 = dark blue
#tput setaf 5 = purple
#tput setaf 6 = cyan
#tput setaf 7 = gray
#tput setaf 8 = light blue
################################################################################################################## ##################################################################################################################
# Written to be used on 64 bits computers # Written to be used on 64 bits computers
# Author : Erik Dubois # Author : Erik Dubois
@ -27,7 +36,14 @@
#setting up git #setting up git
#https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-config #https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-config
#https://medium.com/clarusway/how-to-use-git-github-without-asking-for-authentication-always-passwordless-usage-of-private-git-8c32489bc2e9
#https://blog.nillsf.com/index.php/2021/05/27/github-sso-using-password-protected-ssh-keys
project=$(basename `pwd`)
githubdir="arcolinux"
echo "-----------------------------------------------------------------------------"
echo "this is project https://github.com/$githubdir/$project"
echo "-----------------------------------------------------------------------------"
echo echo
tput setaf 1 tput setaf 1
@ -40,15 +56,8 @@ echo "Select the correct desktop"
echo echo
echo "0. Do nothing" echo "0. Do nothing"
echo "1. Erik" echo "1. Erik"
echo "2. Marco" echo "2. Raniel"
echo "3. Raniel" echo "3. Steve"
echo "4. John"
echo "5. Steve"
echo "6. Brad"
echo "7. fake1"
echo "8. fake2"
echo "9. fake3"
echo "10. fake4"
echo "Type the number..." echo "Type the number..."
read CHOICE read CHOICE
@ -66,22 +75,16 @@ case $CHOICE in
1 ) 1 )
git config --global pull.rebase false git config --global pull.rebase false
git config --global push.default simple git config --global push.default simple
git config --global user.name "Erik Dubois" git config --global user.name "arcolinuxz"
git config --global user.email "erik.dubois@gmail.com" git config --global user.email "arcolinuxinfo@gmail.com"
sudo git config --system core.editor nano sudo git config --system core.editor nano
git config --global credential.helper cache #git config --global credential.helper cache
git config --global credential.helper 'cache --timeout=32000' #git config --global credential.helper 'cache --timeout=32000'
git remote set-url origin git@github.com-arc:$githubdir/$project
echo
echo "Everything set"
;; ;;
2 ) 2 )
git config --global pull.rebase false
git config --global push.default simple
git config --global user.name "Marco Obaid"
git config --global user.email "marco.obaid@gmail.com"
sudo git config --system core.editor nano
git config --global credential.helper cache
git config --global credential.helper 'cache --timeout=32000'
;;
3 )
git config --global pull.rebase false git config --global pull.rebase false
git config --global push.default simple git config --global push.default simple
git config --global user.name "Raniel Laguna" git config --global user.name "Raniel Laguna"
@ -90,16 +93,7 @@ case $CHOICE in
git config --global credential.helper cache git config --global credential.helper cache
git config --global credential.helper 'cache --timeout=32000' git config --global credential.helper 'cache --timeout=32000'
;; ;;
4 ) 3 )
git config --global pull.rebase false
git config --global push.default simple
git config --global user.name "John Blevins"
git config --global user.email "samurailostinjapan@gmail.com"
sudo git config --system core.editor nano
git config --global credential.helper cache
git config --global credential.helper 'cache --timeout=32000'
;;
5 )
git config --global pull.rebase false git config --global pull.rebase false
git config --global push.default simple git config --global push.default simple
git config --global user.name "Steve Younger" git config --global user.name "Steve Younger"
@ -108,27 +102,6 @@ case $CHOICE in
git config --global credential.helper cache git config --global credential.helper cache
git config --global credential.helper 'cache --timeout=32000' git config --global credential.helper 'cache --timeout=32000'
;; ;;
6 )
git config --global pull.rebase false
git config --global push.default simple
git config --global user.name "Brad Heffernan"
git config --global user.email "ph3onix83@gmail.com"
sudo git config --system core.editor nano
git config --global credential.helper cache
git config --global credential.helper 'cache --timeout=32000'
;;
7 )
echo
;;
8 )
echo
;;
9 )
echo
;;
10 )
echo
;;
* ) * )
echo "#################################" echo "#################################"
echo "Choose the correct number" echo "Choose the correct number"
@ -136,12 +109,6 @@ case $CHOICE in
;; ;;
esac esac
echo "###########################################################"
echo "Github credentials have been set"
echo "Delete the ~/.cache/git folder if you made a mistake or"
echo "if you want to switch to your personal github"
echo "###########################################################"
echo "################################################################" echo "################################################################"
echo "################### T H E E N D ######################" echo "################### T H E E N D ######################"
echo "################################################################" echo "################################################################"

Loading…
Cancel
Save