Github for Linux is our today’s topic. Everyone was looking for Github for Ubuntu/Linux in their desktops. Github is a web based implementation of Git. Similar to Git, it is a distributed version control system & also offers the source code management functionality offer by Git. Github has all the features of Git & offers some additional features of its own. Due to coding and using command prompt so many people will get confused. Here I explained different procedures for the installation of Github account and its usage in desktop. Follow all the instructions below to continue enjoying the Github for Linux.
Do we need Github for Linux? Reasons to install Github in Ubuntu/Linux
One of the greatest strength of your Linux distribution is its package manager and the associated software repository. With them, you have all the necessary tools and resources to download and install new software on your computer in a completely automated manner. The download and installation procedure of Github for Linux is very simple if you feel and follow the below steps perfectly.
But despite all their efforts, the package maintainers cannot handle each and every use cases. Nor can they package all the software available out there. So there are still situations where you will have to compile and install new software by yourself. As of myself, the most common reason, by far, I have to compile some software is when I need to run a very specific version. Or because I want to modify the source code or use some fancy compilation options. In this tutorial, we will discuss how we can install Github on Ubuntu systems & use it like we use any git repository. So let’s start into our main topic Github in Linux.
Download and Install Github on Ubuntu || Get Github for Linux
Step 1- Create a Github account
To install Github on Ubuntu, first we need to have a Github account. To create one, go to Official Github Page, next you need to fill the form to create the account,
Mention a username, email address & password to create the account. Once we have created the account, we will move onto next step.
Step 2:- Install Github on the system
Next step is to get the Git packages installed onto our system. Git packages are available with the default repositories on Ubuntu, so we don’t have to install any additional repos & we can simply install all the Git packages using the following command,
$ sudo apt-get install git-core git-gui git-doc
We are now ready to configure the Github on our system & there are two using which we can use github on our system i.e. either using ‘http’ or accessing github using ‘ssh’. We will discuss both processes one by one.
Step 3A- Using HTTP for connection
For this method, we will start by configuring the username & email-address on git that we have used for Github. To configure the username, execute the following command from terminal,
$ git config –global user.name “linuxtechlab”
Replace “linuxtechlab” with your username. Next to configure the email address for git, use the following command,
$ git config –global user.email “email@example.com”
Now, create a directory on your system for cloning the Github repository,
$ mkdir /home/linuxtechlab/git_repo
Make the directory git ready by running following command,
$ cd /home/linuxtechlab/git_repo
$ git init
Now we can clone the repo from github, use the following command,
$ git clone
Again, replace linuxtechlab/testproject.git with your username & project name. Next you will asked to enter the username & password for Github, as soon as we do so cloning will start.
Step 3B – Using SSH for connection
For this method, we will start by creating Public/Private SSH keys also known as ‘ssh key pair’. Create the key using the following method,
$ cd ~/.ssh
Note:- If the following folder does not exist, than create it.
To create key pair, use the command,
$ ssh-keygen -t rsa -C “firstname.lastname@example.org”
Once you hit enter you will be asked a bunch of options, you can hit enter to use the default values for all (unless you want to modify something). So we now have our ssh key pair. For next step we would the public key, it should be named as “id_rsa.pub” (unless you have modified the name, in that case look for file with .pub extension).
Open the public key file & copy the content of the file. Now head over to web browser, where you are logged into the github account. We need to goto,
Account Settings → SSH Keys → Add another public key
Now paste the copied content of public key into the ‘key’ field & than press ‘Add key’. Now head back to terminal on Ubuntu & run the following command,
That’s it, we can now start the cloning on our system. As we did above, first create a folder for cloning the repository, make it git ready & than start the cloning,
$ mkdir /home/linuxtechlab/git_repo
$ git init
$ git clone email@example.com:username/projectname.git
That’s it for this tutorial on how to install Github for Linux. We technologymess finally came to a conclusion on Github for UBUNTU. I gave all the information which i knew about the topic. Please share this article if you like it. Feel free to reach to us using the comment box below for any question or suggestion.