Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • DevOps Lifecycle
  • DevOps Roadmap
  • Docker Tutorial
  • Kubernetes Tutorials
  • Amazon Web Services [AWS] Tutorial
  • AZURE Tutorials
  • GCP Tutorials
  • Docker Cheat sheet
  • Kubernetes cheat sheet
  • AWS interview questions
  • Docker Interview Questions
  • Ansible Interview Questions
  • Jenkins Interview Questions
Open In App
Next Article:
How to Add GIT Credentials in Jenkins?
Next article icon

How to Add GIT Credentials in Jenkins?

Last Updated : 04 Jan, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Git is a famous distributed version control system. Version Control Systems are mainly two types. Distributed & Centralised Version Control System. Centralized Version Control Systems are older & very hectic to use. That is why Distributed Version Control Systems are nowadays very famous for use. Besides Git, Mercurial and Bazaar are very well-known applications under Distributed Version Control systems. Git helps to modify any application with the help of other peers as well. That is why Git is being used on a large scale in companies. Also, Git can be installed in any third-party software as a plugin there. But Git is a repository. Only the GitHub repository can be installed into any third-party software.

Jenkins is an important open-source software. While developing any software for any client, it is important to test the software there. Jenkins helps a lot to test, and deploy software. It also helps to provide a demo run of the software. Products developed using Git can also be tested using Jenkins. For setup Git in Jenkins Credential is important. For that one important pre-requisite is to have Jenkins on the machine beforehand. Features of git:

  • Git helps to contribute to a single project by several contributions without changing the base structure of the project.
  • Git helps to branch a project development into several subtopics. Then they merge themselves & do a complete project.
  • Git helps to view the earlier changes made to a certain project.

Configuring Jenkins Credentials For Git

Step 1: At first, we need to open the Jenkins Dashboard on the machine. There on the left-hand side of the screen, we will find a couple of options provided there. First, we need to add a Credential option there. For that purpose, we need to click on the Manage Jenkins option.

Clicking-manage-jenkins-option
 

Step 2: Then, a new tab will open. There we need to click on the Manage Plugin option to add the Credential option there.

Clicking-manage-plugins-options
 

Step 3: Then we need to click on the Available Tab & we should search for 'Credential' in the search bar provided there.

Clicking-on-available-tab
 

Step 4: Then, we will find the Credential Plugin option available there. We need to click on it to install the Credential into Jenkins.

Installing-credentials-plugin
 

Step 5: Now, again, we move to the Jenkins Dashboard. There in those options menu, we will find the Credential option available. We need to click on it for further procedures.

Clicking-on-credentials
 

Step 6: There, a new tab will be opened. A Store Scoped tab will be available there. We have to click on Jenkins to add Git.

Adding-git
 

Step 7: Then again, we need to click on the Global Credential. It will open another window in front of the user.

Clicking-global-credentials
 

Step 8: In the newly opened window, on the very left-hand side of the screen, two options will be available. In between them, we need to click on Add Credential option to add Git Credentials into Jenkins.

Clicking-add-credentials
 

Step 9: Then, a new window will open. There is a couple of things we need to be aware of. There are many fields which we need to fill up.

  • There is a 'Kind' field option. This option is generally used for security purposes. The kind of security which is preferred by the user. That we need to enter there, there are a lot of options provided there. Any option can be chosen by the user.

Note: User please kindly note that, it is advisable to go for Username with password security only. Choosing any different kind of security option can arise problems in future. Though there will no such problems related to the machine for choosing any different kind of security. User may can't remember the security aspects in future. In such cases, there will be problem while using Git.

  • There is a 'Scope' field. This field helps to determine the scope of Jenkins while operating Git. There are two options. Global & Private. Private means it can be only accessible from a certain machine only. Global means this can be accessible from every machine, as per user choice. They can choose any option.

Note: User please note that, it is advisable to choose the Global option. As it helps to do any job with the Git using Jenkins. If Private mode is being choose, then problem may arised when working with Got. Choosing Global option will not create0 any problem with Jenkins or with Git.

  • Then there are two fields available there. These are 'Username' & 'Password'. Here, the user needs to provide the Username & the Password of their GitHub account. Providing any other Username & Password will not work here.
  • There is another field called 'ID'. Please don't provide any information there. It will be auto-filled by Jenkins while adding Git there.
  • Also, there is a 'Description' field. Users can provide any information there as per the user's choice they can provide any information.

Then we have to click on the Ok option. Then the GitHub repository will be added to Jenkins. Users need to wait for the completion of the process.

GitHub-repository-added
 

Step 10: After successfully adding Git to Jenkins, the User can find the GitHub details on the Global Credentials page. This page will open automatically.

Global-credentials-page
 

Step 11: Now, we have completed the Jenkins Credential Setup for Git. We can also click on the details above. After clicking, we will find all the details there. Then we also noticed that the 'ID' section is filled up. If the 'ID' section is filled up automatically, then we have successfully added Git into Jenkins.

ID-section-filled

Hence, we have successfully set up Jenkins Credentials for Git.


Next Article
How to Add GIT Credentials in Jenkins?

S

sounetraghosal2000
Improve
Article Tags :
  • DevOps
  • Jenkins

Similar Reads

    How to Add GIT Credentials in MacOS?
    Git is an essential tool for developers, enabling them to manage their codebase and collaborate with others effectively. To interact with remote repositories on platforms like GitHub, GitLab, or Bitbucket, you need to authenticate using your Git credentials. This article will guide you through the p
    3 min read
    How to Add GIT Credentials on Windows?
    Managing Git credentials on Windows is important for seamless interaction with remote repositories. Whether you're pushing code to GitHub, GitLab, or another Git service, storing your credentials securely can save you from repeatedly entering your username and password. This article will walk you th
    2 min read
    How to Add Git Credentials in Eclipse?
    Git is a free and open-source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. It is used for tracking changes in project files done by multiple developers and programmers. And Eclipse is one of the most popular integrated
    2 min read
    How to Add GIT Credentials in VS Code?
    Git is a version management system for computer files that track changes. It is commonly used in software development for source code management. It is intended to handle any form of project, large or little, with speed and efficiency. It focuses on distributed software development so that additiona
    3 min read
    How to use AWS Credentials in Jenkins Pipeline
    Jenkins, an industry-standard automation server, assumes a pivotal role in present-day software development practices, especially in continuous integration and continuous delivery (CI/CD) work processes. As associations progressively embrace distributed computing, coordination with cloud services li
    8 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences