How to configure Jenkins with with Git Hub for linux /windows enviornment - Hybris build process

Hello Friends,

As you already know Jenkins is a software use for continuous integration. Jenkins will be installed on a server where the central build will take place.

Also you know about GIT hub which is use for repository

From project point of view it is very important to know how Jenkins used with Git hub so lets discuss about.
Today will explain how to integrate Jenkins in Linux with private GIT Hub.

After install Jenkins you need to configure so please follow below steps

Note: below configuration given for Linux/Unix environment. If your environment is window then just open what graphical image given and then configure


1.     Configuring the GIT plugin in Jenkins:

Jenkins à Manage Jenkins à Manage Plugins
Make sure Jenkins GIT Client Plugin and Jenkins GIT plugins are installed.




2.     Configure GIT in server (if it is install on Linux enviornment):

Login to Jenkins server via puty
Execute the following command - sudo yum install git-all


3.     Configure GIT executable path:

Jenkins àMange JenkinsàConfigure System
Enter the git executable path(git installed to the server in previous step)
My case the path is /usr/bin/git, change accordingly



4.     SSH Configuration:

Login to Jenkins server via putty
Execute the following commad - sudo -u jenkins ssh-keygen -t rsa
Enter the details accordingly, Passphrase is optional if required then enter some string.
This will create private and public keys under /var/lib/jenkins/.ssh (default files are id_rsa and id_rsa.pub)

5.     Configuring Credential:
Login to Jenkins console --> Jenkins Credentials
Click on add a domain – Enter some name(better git hub host name)
Click on Add credential
Enter the user name as Jenkins(the user that runs the jenkins)
Select From the Jenkins master ~/.ssh



6.     Configure deployment key in GIT:

Login to GIT and click on Profile Settings
Click on SSH Keys – Enter the content of id_rsa.pub(cat id_rsa.pub) to Key filed
Click on add key.







7.     Configure the Job:

Configure the GIT URL and select the credential name created in the previous step
Specify the branch to be build.






1 comment: