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 On Fri, Feb 3, 2017 at 1:58 AM Sivakrishna Yarra < [email protected]> wrote: > 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 > <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 > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/44f03a6b-1ec0-4c3e-867e-8535001ed62f%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/44f03a6b-1ec0-4c3e-867e-8535001ed62f%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtFvt3D%3DOoTDUmcDYCYaFWuqK4zdUowrjEKdphYjN6V_iA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
