Created
April 15, 2018 18:28
-
-
Save dkoloditch/3ef93aef7af12bfcc377393f2637ab00 to your computer and use it in GitHub Desktop.
Git Setup Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
name="" | |
email="" | |
echo " " | |
echo "****************************" | |
echo " " | |
echo " Git Config " | |
echo " " | |
echo "****************************" | |
echo " " | |
read -p "Enter your name: " name | |
read -p "Enter your email: " email | |
echo " " | |
git config --global user.name "$name" | |
git config --global user.email "$email" | |
ssh-keygen -t rsa -C "$email" | |
eval "$(ssh-agent -s)" | |
ssh-add $HOME/.ssh/id_rsa | |
echo " " | |
echo " " | |
cat $HOME/.ssh/id_rsa.pub | |
echo " " | |
echo " " | |
echo "Copy your public key above and paste in Settings > SSH Keys on github.com" | |
read -p "Press [Enter] to continue." | |
ssh -T git@github.com | |
echo "****************************" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment