/How to add Github support to Jenkins

How to add Github support to Jenkins

Add your Github repository to the powerful Jenkins automation platform.

How to add Github support to Jenkins
Add your Github repository to the powerful Jenkins automation platform.

Automation is the name of the game for business, especially in this cloud-centric, containerized world we now live in. To that end, you might have installed Jenkins as your open source, automation server. With that tool ready to serve, you’re probably wondering how to make it more useful. 

The first thing you should do is add Github support. With Github supported included, you can empower Jenkins with your Git repositories, such that it will automatically work with that centralized location containing your code.

But how do you add Github support to Jenkins? It’s actually quite simple. Let me show you.

SEE: Hybrid cloud: A guide for IT pros (TechRepublic download)

Additional resources

What you’ll need

The only things you’ll need to make this work are:

  • A running instance of Jenkins.
  • An admin account to log into your Jenkins server.
  • A Github account.

That’s it. Let’s make the connection.

How to install the plugin

Log into your Jenkins server with an admin account. From the main page, click Manage Jenkins (Figure A).

Figure A


In the resulting page (Figure B), click Manage Plugins. 

Figure B


Managing your Jenkins server.

In the resulting window, click Check Now. After a moment, you should be able to search for Git in the search field. Once the results appear (Figure C), click the checkbox for Github Authentication.

Figure C


The Github Authentication plugin.

Once you’ve marked the plugin for installation, you’ll see the Download Now And Install After Restart button. Click that and wait for the installation and restart to complete. If the Jenkins page doesn’t refresh after a while, simple go back to http://SERVER_IP:8080 (where SERVER_IP is the IP address of the server) and log back in.

How to connect with GitHub

Go back to the main Jenkins page and click Create Job. You should now see a listing of possible jobs (Figure D). Type a name for the new job, select Freestyle Project, and click OK.

Figure D


In the Source Code Management tab (Figure E), select Git and then fill out the necessary repository URL for your Github project repository.

Figure E


Configuring Github authentication.

Click the Add drop-down associated with Credentials, select Jenkins, and then fill out the required bits of information (Figure F).

Figure F


Adding authentication credentials for Github.

And that’s it. You can now start working with your project through Jenkins, creating build triggers, adding post-build actions, and much more. Congratulations, you’re one step closer to adding automation to your project.

Also see


Image: Jenkins

Original Source