[JIRA] (JENKINS-61611) using http git url returned status code 128:stderr:remote:unauthorized

5 views
Skip to first unread message

sundewei_@163.com (JIRA)

unread,
Mar 22, 2020, 4:38:02 AM3/22/20
to jenkinsc...@googlegroups.com
david sun created an issue
 
Jenkins / Task JENKINS-61611
using http git url returned status code 128:stderr:remote:unauthorized
Issue Type: Task Task
Assignee: rsandell
Attachments: image-2020-03-22-16-08-36-719.png, image-2020-03-22-16-08-57-152.png, image-2020-03-22-16-16-18-934.png, image-2020-03-22-16-18-25-107.png, image-2020-03-22-16-26-51-123.png, image-2020-03-22-16-28-16-352.png, image-2020-03-22-16-28-51-848.png, image-2020-03-22-16-29-29-705.png
Components: gerrit-trigger-plugin
Created: 2020-03-22 08:36
Environment: windows 10.0.17134 N/A Build 17134
Jenkins 2.204.3
git version 2.24.1.windows.2
Gerrit 3.1.2
Priority: Minor Minor
Reporter: david sun

I have struggled for this issue for few days everyone who knows how to fix it please help me.

I installed git and gerrit and jenkins on the same PC and both gerrit and git works fine.I signed up a new user account which named "jenkins" on gerrit server and added it into non-interactive group . but when I started a new project on jenkins I enconunterred an iusses like below:

when I try to use http url of git repository ,it always shows like below.I'm sure of using the correct http credential generated for gerrit user and test it for many times .

 

I use the same http credential on gerrit trigger ,it works fine.

and when I use these commands to test it manually it works fine too.

I even capture some packet through wireshark :

 

when I use ssh ,it shows like below.I generated ssh key for this user and filled the public key on gerrit server and the private key on the jenkins credential for ssh.

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

sundewei_@163.com (JIRA)

unread,
Mar 22, 2020, 4:47:03 AM3/22/20
to jenkinsc...@googlegroups.com
david sun updated an issue
Change By: david sun
I have struggled for this issue for few days everyone who knows how to fix it please help me.

I
installed git and gerrit and jenkins on the same PC and both gerrit and git works fine.

Environment:

windows 10.0.17134 N/A Build 17134
Jenkins 2.204.3
git version 2.24.1.windows.2
Gerrit 3.1.2

I signed up a new user account which named "jenkins" on gerrit server and added it into non-interactive group . but when I started a new project on jenkins I enconunterred an iusses like below:

when I try to use http url of git repository ,it always shows like below.I'm sure of using the correct http credential generated for gerrit user and test it for many times .

 

!image-2020-03-22-16-08-57-152.png!


I use the same http credential on gerrit trigger ,it works fine.

!image-2020-03-22-16-26-51-123.png!


and when I use these commands to test it manually it works fine too.

!image-2020-03-22-16-16-18-934.png!


I even capture some packet through wireshark :

!image-2020-03-22-16-28-16-352.png!

 

!image-2020-03-22-16-28-51-848.png!

!image-2020-03-22-16-29-29-705.png!


when I use ssh ,it shows like below.I generated ssh key for this user and filled the public key on gerrit server and the private key on the jenkins credential for ssh.

!image-2020-03-22-16-18-25-107.png!

 


Thanks for your help!

Best Regards

 

 

sundewei_@163.com (JIRA)

unread,
Mar 22, 2020, 5:20:02 AM3/22/20
to jenkinsc...@googlegroups.com
david sun updated an issue
I installed git and gerrit and jenkins on the same PC and both gerrit and git works fine.

Environment:

windows 10.0.17134 N/A Build 17134
Jenkins 2.204.3
git version 2.24.1.windows.2
Gerrit 3.1.2

I signed up a new user account which named "jenkins" on gerrit server and added it into non-interactive group . but when I started a new project on jenkins I enconunterred an iusses like below:

when I try to use http url of git repository ,it always shows like below.I'm sure of using the correct http credential generated for gerrit user and test it for many times .

 

!image-2020-03-22-16-08-57-152.png!

I use the same http credential on gerrit trigger ,it works fine.

!image-2020-03-22-16-26-51-123.png!

and when I use these commands to test it manually it works fine too.

!image-2020-03-22-16-16-18-934.png!

 

Started by user admin
Running as SYSTEM
Building in workspace C:\Program Files (x86)\Jenkins\workspace\test
using credential d408a5f8-d8c6-4d5f-a07b-e378bee5e5bf
> git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git.exe config remote.origin.url http://jen...@10.120.51.200:10002/a/test # timeout=10
Fetching upstream changes from http://jen...@10.120.51.200:10002/a/test
> git.exe --version # timeout=10
using GIT_ASKPASS to set credentials 3.22.13:10
> git.exe fetch --tags --force --progress -- http://jen...@10.120.51.200:10002/a/test +refs/heads/*:refs/remotes/origin/* # timeout=10
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from http://jen...@10.120.51.200:10002/a/test
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:909)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1131)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1167)
at hudson.scm.SCM.checkout(SCM.java:505)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1205)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
at hudson.model.Run.execute(Run.java:1853)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:427)
Caused by: hudson.plugins.git.GitException: Command "git.exe fetch --tags --force --progress -- http://jen...@10.120.51.200:10002/a/test +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout:
stderr: remote: Unauthorized
fatal: Authentication failed for 'http://10.120.51.200:10002/a/test/'

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2430)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2044)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:81)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:569)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:907)
... 11 more
ERROR: Error fetching remote repo 'origin'
Finished: FAILURE

 

I even capture some packet through wireshark :

!image-2020-03-22-16-28-16-352.png!

 

!image-2020-03-22-16-28-51-848.png!

!image-2020-03-22-16-29-29-705.png!

when I use ssh ,it shows like below.I generated ssh key for this user and filled the public key on gerrit server and the private key on the jenkins credential for ssh.

!image-2020-03-22-16-18-25-107.png!

 

Thanks for your help!

Best Regards

 

 

sundewei_@163.com (JIRA)

unread,
Mar 22, 2020, 5:21:02 AM3/22/20
to jenkinsc...@googlegroups.com
I even capture some packet packets captured through wireshark :


!image-2020-03-22-16-28-16-352.png!

 

!image-2020-03-22-16-28-51-848.png!

!image-2020-03-22-16-29-29-705.png!

when I use ssh ,it shows like below.I generated ssh key for this user and filled the public key on gerrit server and the private key on the jenkins credential for ssh.

!image-2020-03-22-16-18-25-107.png!

 

Thanks for your help!

Best Regards

 

 
Reply all
Reply to author
Forward
0 new messages