GitHub is a web based hosting service, originally founded by Chris Wanstrath, PJ Hyett and Tom Preston-Werner for software development projects which offers both commercial plans and free accounts for open source projects. GitHub has grown into an application used by over a million people to store over two million code repositories, making GitHub the largest code host in the world.
Actually, large scale software development projects are done by a group of developers. So they need to share their codes with each other. At this point GitHub provides different set of functions in order to fulfill the requirement of the developers.
First of all go to the GitHub site. In order to use the github you need to create an account. There are different plans available based on repositories and the collaborators. In addition to those plans there is a free open source account which you can select which supports unlimited public repositories and unlimited public collaborators. Select create free account and fill with a user name, email address and a password.
Now we have to download and install Git in our computer. Git is responsible for everything GitHub related that happens locally on your computer. You can download latest versions of Git from this site. Actually I’m writing this post in order to aware the people more about setting up the github. After a new account is created github provides different set of instructions to follow. But in some cases those instructions are not well presented. So I thought of giving some more information about those instructions.
Once you installed the github in your machine you need to set up the ssh keys. First of all we have to check whether we have existing ssh keys in our machine. Open git bash and type cd ~/.ssh .If you are using github for the first time you will get a message which says that there is no such file or directory. If you have already set up the git then you have the access to the .ssh folder. So now you need to backup the existing keys by placing them in another folder within the .ssh folder. Now type
cp id_rsa* key_backup
So let’s generate new ssh keys by typing
ssh-keygen -t rsa -C “email@example.com” (within the semicolon you have to provide your email address.) Then it will ask you to enter the file in which to save the key. Just press enter. Then it will ask you to enter a pass-phrase. It means a password. Just press enter for both places which ask for pass-phrase. Once you have completed the steps you will get this type of a window.
Next step is to add the ssh key to github. In the github go to the Account Settings (Top Right Corner).
For the key space you have to copy the key from the ssh file and paste it. To get the key go to the ssh file which you have already created. There is a file which has the extension .pub. Open that file with notepad to take a copy of the key and add the key. The key should be started from the key word ssh-rsa.
Now we need to test the github. So type ssh -T firstname.lastname@example.org
Then you will get a message saying that you’ve successfully authenticated!!
Now you have already added the key. So now we can add our details to the github using the commands.
git config –global user.name “Firstname Lastname”
git config –global user.email “email address”
Some tools connect to GitHub without SSH. To use these tools properly you need to find and configure your API Token.On the GitHub site Click “Account Settings” > Click “Account Admin.”
git config –global github.user xxxxxxxxxx
git config –global github.token yyyyyyyyyy
For xxxxxxxx you have to enter the user name of the github account and for yyyyyyyyyy you have to enter the token that you have already discovered.
Now we have set up the github !!!