Not able to pulll the code from GitLab using Jenkins

803 views
Skip to first unread message

Sivakrishna Yarra

unread,
Feb 3, 2017, 2:58:33 AM2/3/17
to Jenkins Users
Hello Guys,
I am using Jenkins as CI, i had created a job which will pull the code from GitLab. For this i had configured like this. Under SourceCode Management i had selected Git.
I had porvided my Git Repository URL as like this "http://192.168.1.36/Enliven-Product/EnlivenService.git". 

Immediately i am getting the below exception. Will you please help on this how to resolve.

Failed to connect to repository : Command "git ls-remote -h http://192.168.1.36/Enliven-Product/EnlivenService.git HEAD" returned status code 128:
stdout: 
stderr: error: The requested URL returned error: 401 Unauthorized while accessing http://192.168.1.36/Enliven-Product/EnlivenService.git/info/refs

fatal: HTTP request failed

Mark Waite

unread,
Feb 4, 2017, 8:22:27 AM2/4/17
to Jenkins Users
Does the repository require authentication?  If it does, did you provide a username / password credential for the repository?  If not, you'll need to do that by creating a username / password credential through either the "Add" button in the git configuration of that job, or through the "Manage Credentials" link from the left hand side of the top level Jenkins page.

If you provided credentials, were they username / password credentials and not private key credentials?  Your git repository URL is using http protocol and private key credentials require an ssh style URL, not an http or https URL.

Is your repository available through http protocol, or should you have used the https protocol?  Many users prefer https protocol because it avoids sending username and password text unencrypted between the git client and the git server.

Have you confirmed that your username/password credentials work from a command line for that repository, using that URL?  If not, that is a good way to check that the username/password works outside Jenkins.

Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/44f03a6b-1ec0-4c3e-867e-8535001ed62f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages