
Programming
Setting Up Git/Github on Ubuntu In Five Minutes
1: Install Git
sudo apt-get install git-core git-doc
2: Configure Git
Bare minimum:
git config --global user.name "Firstname Lastname" git config --global user.email ""
Enable colors when outputting to terminal:
git config --global color.ui true
These settings are saved in ~/.gitconfig
.
3: Generate Cryptographic Keys
Create an RSA public/private key pair in the ~/.ssh/
directory. Be sure to use a passphrase.
ssh-keygen -t rsa -C "" -f ~/.ssh/git_rsa
This generates a private key in ~/.ssh/git_rsa
and the corresponding public key in ~/.ssh/git_rsa.pub
4: Add Public Key To Github
Copy all contents of ~/.ssh/git_rsa.pub
and add it to your Github profile.
$ cat ~/.ssh/git_rsa.pub ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDJCqSW4MyOESvnNL6Xjc9jQ3Vvj+yZSqD+HB5Dcbewc3vKpUISaC4mnUetN2B0Xn5QUOVTwdfDti+N+uMHod5VTeDPN7jNdbA/b/Vjo+C+hdJ8tissJDaCSQ29Wluhlogoe/4H3uSWmwKvMkgnK6DK3rXBKdy/T6Xeb8iFlxK5LLUt1B5nv9wxOGlhLd6ul5VeVGZKYxdwRLRkWE1w+ffEnfhJualOOZrW71up2EYl/FnmOMCMA7oKRyje+uQ2XSai220MlMwFH/VSOFskEM9dmilRxtFv27cq1vasiAIloKwFP8uYh42P4m3FPbWMulNXZvA3F4YsDfTBfDzQ3SUt
…