Skip to content

Instantly share code, notes, and snippets.

@dkoloditch
Created April 15, 2018 18:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dkoloditch/3ef93aef7af12bfcc377393f2637ab00 to your computer and use it in GitHub Desktop.
Save dkoloditch/3ef93aef7af12bfcc377393f2637ab00 to your computer and use it in GitHub Desktop.
Git Setup Script
#!/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