How to Setup and use Github in Linux
Learn2Crack shows you how to setup and use Github in Linux operating system.Here I am using Ubuntu Linux 13.04 distribution.
What is Github?
In short it’s the web-based hosting service for software development projects that use the Git revision control system. In English – the place where you store your sources.
1.First want to download the required libs. Open terminal and enter the following code.
sudo apt-get install git
2.Create an account on github.com website
3.Then in terminal type the following code.
git config --global user.name "Your Name Here" git config --global user.email "firstname.lastname@example.org"
4.Then we want to create the unique SSH public key. Type the following code in the terminal.
ssh-keygen -t rsa -C "email@example.com"
# Creates a new ssh key using the provided email
# Generating public/private rsa key pair.
# Enter file in which to save the key (/c/Users/you/.ssh/id_rsa): [Press enter]
5.Now you need to enter a passphrase.
# Enter passphrase (empty for no passphrase): [Type a passphrase]
# Enter same passphrase again: [Type passphrase again]
Which will give the message:
# Your identification has been saved in /c/Users/you/.ssh/id_rsa.
# Your public key has been saved in /c/Users/you/.ssh/id_rsa.pub.
# The key fingerprint is:
# 01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db firstname.lastname@example.org
Now go to ~/.ssh folder and copy your id_rsa.pub content into account administration on github.com … and check if everything works
Type the code in terminal:
ssh -T email@example.com
It asks for the confirmation message:
The authenticity of host ‘github.com (18.104.22.168)’ can’t be established.
# RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
# Are you sure you want to continue connecting (yes/no)?
Then enter yes:
It shows the message:
# Hi username! You’ve successfully authenticated, but GitHub does not
# provide shell access.
Finally you have successfully added your Github account in your Linux.
More git functions will be continued on Next Page.