---
description: This Jenkins GitHub integration tutorial covers step by step process on how to install and integrate Jenkins with Github.
title: Jenkins GitHub Integration: How to Install Git Plugin?
image: https://www.guru99.com/images/jenkins-github-integration-1.png
---

 

[Skip to content](#main) 

**⚡ Smart Summary**

Jenkins GitHub Integration connects an automation server to a source repository so every commit can be built and verified automatically. Installing the Git plugin, creating a Freestyle job, authenticating with a token, and registering a webhook complete the connection.

* 🔌 **Plugin Foundation:** Jenkins ships with a minimal feature set, so third-party support arrives through plugins installed from the Manage Jenkins Plugins page.
* 🌿 **Git vs GitHub Plugin:** The Git plugin supplies the Source Code Management option that clones a repository; the GitHub plugin adds webhook handling and commit status reporting.
* 💻 **Local Git Required:** Jenkins delegates cloning to the Git executable on the host, so a missing local installation produces the repository URL validation error.
* 🔑 **Token Authentication:** GitHub stopped accepting account passwords for Git operations in August 2021, so private repositories require a personal access token or an SSH key.
* 🪝 **Automatic Triggering:** A repository webhook pointing at the Jenkins github-webhook endpoint starts a build on every push instead of a manual run.
* 🧾 **Verification:** Running git –version confirms the executable resolves, and Manage Jenkins Tools records its path.
* 🛠️ **Failure Recovery:** Missing Source Code Management options, rejected credentials, and silent webhooks cause most integration failures.

[ Read More ](javascript:void%280%29;) 

![Jenkins GitHub Integration](https://www.guru99.com/images/jenkins-github-integration-1.png)

You have already learned what Jenkins is and how to [install it on a Windows system](https://www.guru99.com/download-install-jenkins.html). Assuming those basic steps are complete, we shall now move on to plugin management.

Jenkins has outstanding plugin support. Over a thousand third-party application plugins are available. To check whether Jenkins supports the third-party application you have in mind, search the plugins directory at <https://plugins.jenkins.io/>.

[](https://www.guru99.com/images/1/091318%5F0440%5FJenkinsGitH1.png)

## Installation of Plugins in Jenkins

Jenkins comes with a fairly basic setup, so you need to install the required plugins to enable support for each third-party application.

GitHub is a web-based repository of code that plays a major role in DevOps. It provides a common platform for multiple developers working on the same code or project to upload and retrieve updated code, thereby facilitating continuous integration.

Jenkins needs the Git plugin installed before it can pull code from a GitHub repository. The two plugin names are often confused, so the table below separates them:

| Plugin        | What it provides                                                                              | Required for this walkthrough?  |
| ------------- | --------------------------------------------------------------------------------------------- | ------------------------------- |
| Git plugin    | The **Git** option under Source Code Management, repository cloning, and branch selection     | Yes — this is the essential one |
| GitHub plugin | Webhook handling, the _GitHub hook trigger_ option, and build status reported back to commits | Only for automatic triggering   |

You need not install these plugins if you already accepted the suggested plugins during the [Jenkins](https://www.guru99.com/jenkin-continuous-integration.html) installation setup, since the Git plugin is part of that set. If not, here is how to install them and pull code from a GitHub repository.

## How to Install Git Plugin in Jenkins

Following is a step by step process on how to install the Git plugin in Jenkins:

**Step 1:** Open your dashboard.  
Click on the **Manage Jenkins** button on your Jenkins dashboard:

[](https://www.guru99.com/images/1/091318%5F0440%5FJenkinsGitH2.png)

**Step 2:** Find the plugins option.  
Click on **Plugins**. On current Jenkins releases this entry is labelled simply **Plugins**; older releases labelled the same screen **Manage Plugins**.

[](https://www.guru99.com/images/1/091318%5F0440%5FJenkinsGitH3.png)

**Step 3:** On the Plugins page, open the **Available plugins** tab and then:

1. Select the **Git** plugin
2. Click **Install without restart**. The plugin takes a few moments to download, depending on your internet connection, and is installed automatically.
3. You may instead choose **Download now and install after restart**, in which case the plugin is applied when Jenkins next starts.
4. If the plugin is already present, it appears on the **Installed** tab and no update is offered.

[](https://www.guru99.com/images/1/091318%5F0440%5FJenkinsGitH4.png)

**Step 4:** Once the plugins have been installed, go to **Manage Jenkins > Plugins > Installed**. Your new plugins are listed among the rest.

[](https://www.guru99.com/images/1/091318%5F0440%5FJenkinsGitH5.png)

With the plugin in place, Jenkins can now be pointed at an actual repository.

## How to Integrate Jenkins With GitHub

We shall now walk through the process of integrating Jenkins and GitHub on a Windows system:

**Step 1)** Create a new job in Jenkins. Open the Jenkins dashboard at your Jenkins URL, for example `http://localhost:8080/`, and click **New Item**:

[](https://www.guru99.com/images/1/091318%5F0440%5FJenkinsGitH6.png)

**Step 2)** Enter the item name, select the job type, and click **OK**. We shall create a Freestyle project as an example.

[](https://www.guru99.com/images/1/091318%5F0440%5FJenkinsGitH7.png)

**Step 3)** Once you click **OK**, the page redirects to the project configuration form. Enter the project information here:

[](https://www.guru99.com/images/1/091318%5F0440%5FJenkinsGitH8.png)

**Step 4)** You will see a **Git** option under **Source Code Management** if the Git plugin has been installed in Jenkins:

[](https://www.guru99.com/images/1/091318%5F0440%5FJenkinsGitH9.png)

**Note:** If the **Git** option does not appear, reinstall the plugin, restart Jenkins, and log in to the dashboard again. The **Git** option will then be visible as shown above.

**Step 5)** Enter the Git repository URL to pull the code from GitHub.

[](https://www.guru99.com/images/1/091318%5F0440%5FJenkinsGitH10.png)

**Step 6)** You might get an error message the first time you enter the repository URL. For example:

[](https://www.guru99.com/images/1/091318%5F0440%5FJenkinsGitH11.png)

This happens when Git is not installed on the machine running Jenkins. Jenkins does not bundle its own Git binary; the plugin calls the Git executable on the host. To install Git locally, go to <https://git-scm.com/downloads>.

[](https://www.guru99.com/images/1/091318%5F0440%5FJenkinsGitH12.png)

Download the appropriate Git installer for your [Operating System](https://www.guru99.com/operating-system-tutorial.html) — in this case Windows — and install it on the machine running Jenkins. Complete the onscreen instructions to finish the installation.

[](https://www.guru99.com/images/1/091318%5F0440%5FJenkinsGitH13.png)

**Step 7)** Jenkins can execute Git repositories once Git is installed on the machine. To confirm the installation, open a **command prompt**, type `git`, and press Enter. A list of Git options appears:

[](https://www.guru99.com/images/1/091318%5F0440%5FJenkinsGitH14.png)

:: Confirm the Git executable resolves and report its version
git --version

:: Expected output
git version 2.51.0.windows.1

:: Show the full path Jenkins should record in Global Tool Configuration
where git

This confirms that Git is installed on your system.

**Note:** If Git is already installed, add the `git.exe` path under **Manage Jenkins > Tools** (labelled **Global Tool Configuration** on older releases).

**Step 8)** With everything in place, add the Git URL into Jenkins again. No error message appears, which confirms the Jenkins Git integration:

[](https://www.guru99.com/images/1/091318%5F0440%5FJenkinsGitH15.png)

Git is now properly configured on your system. A public repository will clone at this point, but a private one still needs credentials, which is the next step.

### RELATED ARTICLES

* [What is Jenkins? Why Use Continuous Integration (CI) Tool? ](https://www.guru99.com/jenkin-continuous-integration.html "What is Jenkins? Why Use Continuous Integration (CI) Tool?")
* [Top 12 Jenkins Interview Questions and Answers (PDF) ](https://www.guru99.com/jenkins-interview-questions.html "Top 12 Jenkins Interview Questions and Answers (PDF)")
* [What is CI/CD? Continuous Integration and Continuous Delivery ](https://www.guru99.com/continuous-integration.html "What is CI/CD? Continuous Integration and Continuous Delivery")
* [Continuous Integration vs Delivery vs Deployment ](https://www.guru99.com/continuous-integration-vs-delivery-vs-deployment.html "Continuous Integration vs Delivery vs Deployment")

## How to Authenticate Jenkins With a GitHub Personal Access Token

GitHub stopped accepting account passwords for Git operations in August 2021\. Supplying a username and password in Jenkins therefore fails against any private repository with an authentication error, even when the same credentials sign in to the GitHub website. A personal access token replaces the password, and Jenkins stores it in its own credentials store rather than in the job configuration.

Create the token in GitHub first:

1. In GitHub, open **Settings > Developer settings > Personal access tokens**.
2. Choose a **fine-grained** token where possible, because it can be scoped to a single repository, or a **classic** token if your organisation still requires one.
3. Grant read access to repository contents. Add commit status write access only when you want Jenkins to report build results back onto commits.
4. Set an expiry date and copy the token immediately — GitHub displays it exactly once.

Then register the token inside Jenkins:

1. Go to **Manage Jenkins > Credentials > System > Global credentials** and click **Add Credentials**.
2. Select **Username with password** as the kind. Enter your GitHub username, and paste the _token_ into the password field.
3. Give the entry a clear ID such as `github-pat` so it is recognisable in job configuration screens.
4. Return to the job, open **Source Code Management > Git**, and select the new credential from the **Credentials** dropdown.

The red validation error under the repository URL disappears once Jenkins can authenticate. Two practical notes are worth remembering. First, tokens expire; a job that has run reliably for months and suddenly fails on checkout is almost always an expired token rather than a broken repository. Second, an SSH key is a valid alternative — add the private key as an **SSH Username with private key** credential and use the `git@github.com:owner/repo.git` URL form instead of the HTTPS form.

## How to Trigger Jenkins Builds Automatically With a GitHub Webhook

The job created above still has to be started by hand, which defeats the purpose of continuous integration. A webhook closes that gap: GitHub sends an HTTP request to Jenkins on every push, and Jenkins starts the build immediately.

Jenkins must be reachable from GitHub for this to work. On a laptop running `localhost:8080` it is not, so either host Jenkins on a public URL or expose it temporarily through a tunnelling service during testing.

1. **Install the GitHub plugin.** Return to **Manage Jenkins > Plugins > Available plugins** and install **GitHub**. This adds the trigger option that the Git plugin alone does not provide.
2. **Enable the trigger on the job.** Open the job configuration, scroll to **Build Triggers**, and tick **GitHub hook trigger for GITScm polling**.
3. **Add the webhook in GitHub.** In the repository, open **Settings > Webhooks > Add webhook**.
4. **Set the payload URL** to your Jenkins address followed by `/github-webhook/`. The trailing slash matters.
5. **Set the content type** to `application/json` and choose **Just the push event**.
6. **Save and test.** GitHub sends a ping immediately. A green tick under **Recent Deliveries** means Jenkins accepted it.

# Payload URL format for the GitHub webhook
https://jenkins.example.com/github-webhook/

# Content type
application/json

# Verify from the Jenkins host that the endpoint answers
curl -I https://jenkins.example.com/github-webhook/

Push a commit to confirm the loop is closed. The job should appear in the build queue within a few seconds without any manual action. If nothing happens, open the webhook in GitHub and read the **Recent Deliveries** response code: a 403 usually points at Jenkins security settings blocking anonymous access to the endpoint, while a timeout means GitHub cannot reach the Jenkins URL at all.

Once builds trigger automatically, the remaining friction is usually a handful of recurring errors.

## Common Jenkins GitHub Integration Errors and Fixes

Nearly every failed integration falls into one of the categories below, and each has a distinct symptom that points straight at the cause.

* **No Git option under Source Code Management:** the Git plugin is not installed or not loaded. Reinstall it from **Manage Jenkins > Plugins**, restart Jenkins, and reload the job configuration page.
* **“Failed to connect to repository” on a public URL:** Git is missing from the Jenkins host. Install Git, then confirm with `git --version` and record the path under **Manage Jenkins > Tools**.
* **Authentication failed on a private repository:** an account password is being used. Replace it with a personal access token as described above, or switch to an SSH key.
* **Builds never start after a push:** either the _GitHub hook trigger_ checkbox is unticked, or GitHub cannot reach the Jenkins URL. Check the webhook delivery log in the repository settings.
* **Wrong branch is built:** the **Branch Specifier** still holds the default `*/master` while the repository uses `main`. Update the specifier to match.
* **Checkout worked yesterday and fails today:** the personal access token has reached its expiry date. Generate a replacement and update the stored credential.

**Also Check:** [Best Jenkins Alternatives (Open Source & Paid)](https://www.guru99.com/jenkins-alternative.html) and the [CI/CD pipeline](https://www.guru99.com/ci-cd-pipeline.html) walkthrough, which builds on the connection established here.

## FAQs

🦊 Does the same setup work with GitLab or Bitbucket?

Yes. The Git plugin clones from any Git host, so the Source Code Management steps are identical. Only the webhook configuration differs, and dedicated GitLab or Bitbucket plugins provide host-specific triggers and status reporting.

📄 Should a Jenkinsfile replace this Freestyle job?

For anything beyond a demonstration, yes. A Jenkinsfile stores the [pipeline](https://www.guru99.com/ci-cd-pipeline.html) definition in the repository itself, so build steps are versioned and reviewed alongside the code rather than living only in the Jenkins UI.

🤖 How does AI assist with Jenkins and GitHub workflows?

[AI](https://www.guru99.com/ai-tutorial.html) assistants summarize failed build logs, propose the likely offending commit, and draft pipeline steps from a repository structure. Review every suggestion before applying it, particularly anything touching credentials.

🧠 Can AI replace Jenkins for continuous integration?

No. AI accelerates diagnosis and configuration authoring, but the orchestration, scheduling, and audit trail still require a build server. Treat AI as an assistant layered on top of [Jenkins](https://www.guru99.com/jenkins-tutorial.html), not a replacement for it.

🔄 Is polling an alternative when webhooks are not possible?

Yes. **Poll SCM** under Build Triggers checks the repository on a schedule using cron syntax. It works behind a firewall but wastes requests and delays builds, so prefer webhooks whenever Jenkins is reachable.

#### Summarize this post with:

ChatGPT Perplexity Grok Google AI 

**Stay Updated on AI** **Get Weekly AI Skills, Trends, Actionable Advice.** 

##### Sign up for the newsletter

Subscribe for Free 

You have successfully subscribed.  
Please check your inbox. 

![AI-Newsletter]() Chosen by over **350,000+** professionals 

[Scroll to top ](#wrapper)Scroll to top 

× 

Toggle Menu Close 

Search for: 

Search

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.guru99.com/#organization","name":"Guru99","sameAs":["https://www.facebook.com/Guru99Official","https://twitter.com/guru99com"],"logo":{"@type":"ImageObject","@id":"https://www.guru99.com/#logo","url":"https://www.guru99.com/images/guru99-logo-v1-150x59.png","contentUrl":"https://www.guru99.com/images/guru99-logo-v1-150x59.png","caption":"Guru99","inLanguage":"en-US"}},{"@type":"WebSite","@id":"https://www.guru99.com/#website","url":"https://www.guru99.com","name":"Guru99","publisher":{"@id":"https://www.guru99.com/#organization"},"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https://www.guru99.com/images/jenkins-github-integration-1.png","url":"https://www.guru99.com/images/jenkins-github-integration-1.png","width":"700","height":"250","caption":"Jenkins GitHub Integration","inLanguage":"en-US"},{"@type":"BreadcrumbList","@id":"https://www.guru99.com/jenkins-github-integration.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":"1","item":{"@id":"https://www.guru99.com","name":"Home"}},{"@type":"ListItem","position":"2","item":{"@id":"https://www.guru99.com/jenkins","name":"Jenkins"}},{"@type":"ListItem","position":"3","item":{"@id":"https://www.guru99.com/jenkins-github-integration.html","name":"Jenkins GitHub Integration: How to Install Git Plugin?"}}]},{"@type":"WebPage","@id":"https://www.guru99.com/jenkins-github-integration.html#webpage","url":"https://www.guru99.com/jenkins-github-integration.html","name":"Jenkins GitHub Integration: How to Install Git Plugin?","dateModified":"2026-07-29T13:31:17+05:30","isPartOf":{"@id":"https://www.guru99.com/#website"},"primaryImageOfPage":{"@id":"https://www.guru99.com/images/jenkins-github-integration-1.png"},"inLanguage":"en-US","breadcrumb":{"@id":"https://www.guru99.com/jenkins-github-integration.html#breadcrumb"}},{"@type":"Person","@id":"https://www.guru99.com/author/thomas","name":"Thomas Hamilton","description":"I am Thomas Hamilton, a seasoned professional in software testing, specializing in crafting comprehensive guides to help you master your software testing skills.","url":"https://www.guru99.com/author/thomas","image":{"@type":"ImageObject","@id":"https://www.guru99.com/images/thomas-hamilton-author-v2-120x120.png","url":"https://www.guru99.com/images/thomas-hamilton-author-v2-120x120.png","caption":"Thomas Hamilton","inLanguage":"en-US"},"worksFor":{"@id":"https://www.guru99.com/#organization"}},{"articleSection":"Jenkins","headline":"Jenkins GitHub Integration: How to Install Git Plugin?","description":"This Jenkins GitHub integration tutorial covers step by step process on how to install and integrate Jenkins with Github.","keywords":"bigdata, programming, database, server","speakable":{"@type":"SpeakableSpecification","cssSelector":[".entry-title",".summary"]},"@type":"Article","author":{"@id":"https://www.guru99.com/author/thomas","name":"Thomas Hamilton"},"dateModified":"2026-07-29T13:31:17+05:30","image":{"@id":"https://www.guru99.com/images/jenkins-github-integration-1.png"},"copyrightYear":"2026","name":"Jenkins GitHub Integration: How to Install Git Plugin?","subjectOf":[{"@type":"HowTo","name":"How to Install Git Plugin in Jenkins","description":"Here is a step by step process on how to install git plugin in jenkins:","step":[{"@type":"HowToStep","name":"Step 1) Open your dashboard.","text":"Click on the Manage Jenkins button on your Jenkins dashboard:","image":"https://www.guru99.com/images/1/091318_0440_JenkinsGitH2.png","url":"https://www.guru99.com/jenkins-github-integration.html#step1"},{"@type":"HowToStep","name":"Step 2) Find plugins option.","text":"Click on Manage Plugins:","image":"https://www.guru99.com/images/1/091318_0440_JenkinsGitH3.png","url":"https://www.guru99.com/jenkins-github-integration.html#step2"},{"@type":"HowToStep","name":"Step 3) In the Plugins Page,","text":"Select the GIT Plugin -&gt; Install without restart.","image":"https://www.guru99.com/images/1/091318_0440_JenkinsGitH4.png","url":"https://www.guru99.com/jenkins-github-integration.html#step3"},{"@type":"HowToStep","name":"Step 4) Once the plugins have been installed,","text":"Go to Manage Jenkins on your Jenkins dashboard. You will see your plugins listed among the rest.","image":"https://www.guru99.com/images/1/091318_0440_JenkinsGitH5.png","url":"https://www.guru99.com/jenkins-github-integration.html#step4"}]},{"@type":"FAQPage","mainEntity":[{"@type":"Question","name":"Does the same setup work with GitLab or Bitbucket?","acceptedAnswer":{"@type":"Answer","text":"Yes. The Git plugin clones from any Git host, so the Source Code Management steps are identical. Only the webhook configuration differs, and dedicated GitLab or Bitbucket plugins provide host-specific triggers and status reporting."}},{"@type":"Question","name":"Should a Jenkinsfile replace this Freestyle job?","acceptedAnswer":{"@type":"Answer","text":"For anything beyond a demonstration, yes. A Jenkinsfile stores the pipeline definition in the repository itself, so build steps are versioned and reviewed alongside the code rather than living only in the Jenkins UI."}},{"@type":"Question","name":"How does AI assist with Jenkins and GitHub workflows?","acceptedAnswer":{"@type":"Answer","text":"AI assistants summarize failed build logs, propose the likely offending commit, and draft pipeline steps from a repository structure. Review every suggestion before applying it, particularly anything touching credentials."}},{"@type":"Question","name":"Can AI replace Jenkins for continuous integration?","acceptedAnswer":{"@type":"Answer","text":"No. AI accelerates diagnosis and configuration authoring, but the orchestration, scheduling, and audit trail still require a build server. Treat AI as an assistant layered on top of Jenkins, not a replacement for it."}},{"@type":"Question","name":"Is polling an alternative when webhooks are not possible?","acceptedAnswer":{"@type":"Answer","text":"Yes. Poll SCM under Build Triggers checks the repository on a schedule using cron syntax. It works behind a firewall but wastes requests and delays builds, so prefer webhooks whenever Jenkins is reachable."}}]}],"@id":"https://www.guru99.com/jenkins-github-integration.html#schema-148019","isPartOf":{"@id":"https://www.guru99.com/jenkins-github-integration.html#webpage"},"publisher":{"@id":"https://www.guru99.com/#organization"},"inLanguage":"en-US","mainEntityOfPage":{"@id":"https://www.guru99.com/jenkins-github-integration.html#webpage"}}]}
```
