Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Jenkins - Why Integrate With GitHub Using Git Source Instead Of GitHub

Whenever I am showing how to integrate Jenkins with GitHub, you will see that I select Git as the source, and not GitHub.

This is because if you select GitHub, you are restricted to using a username and password, as the detailed information point will explain to you:


I do not wish to provide my username and password for GitHub to give Jenkins to all of my GitHub projects. Instead it is much better to pick Git as a source.

Then create a deploy key in GitHub for that specific project.

Then use that deploy key as an SSH Username with private key credential in Jenkins.

Now Jenkins has restricted access to just that project.

Last updated: 29th June 2021
First published: 29th June 2021