Open In App

How to Add GIT Credentials in Jenkins?

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:



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.

 

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



 

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

 

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

 

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.

 

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.

 

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

 

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.

 

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.

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.

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 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.

 

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.

 

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.

 

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

Article Tags :