[JIRA] [git-client-plugin] (JENKINS-32570) Error push new tag to git repository

3 views
Skip to first unread message

limkinpablo@gmail.com (JIRA)

unread,
Jan 22, 2016, 6:14:01 AM1/22/16
to jenkinsc...@googlegroups.com
Pablo Vidal created an issue
 
Jenkins / Bug JENKINS-32570
Error push new tag to git repository
Issue Type: Bug Bug
Assignee: Nicolas De Loof
Attachments: Git_config.PNG, Git_publisher.PNG
Components: git-client-plugin, git-plugin
Created: 22/Jan/16 11:13 AM
Environment: Jenkins version: 1.644
Git plugin: 2.4.1
Git-client plugin: 1.19.1
Credential plugin: 1.24
Labels: git git-plugin git-client
Priority: Major Major
Reporter: Pablo Vidal

When generating a new tag repository, I'm getting an HTTP Error 401. I think the credentials are not being sent on the command.

If I do the same from shell, works properly

These are the logs:

> git tag -l TAG-39 # timeout=10
> git tag -a -f -m http://oclrh65c109.isbcloud.isban.corp:9080/jenkins/job/ReleaseLokiAll/39/ TAG-39 # timeout=10
Pushing tag TAG-39 to repo Toms
> git --version # timeout=10
using .gitcredentials to set credentials
> git config --local credential.username jenkins # timeout=10
> git config --local credential.helper store --file=/tmp/git5654596688481070714.credentials # timeout=10
Setting http proxy: 172.31.219.30:8080
> git -c core.askpass=true push http://grddesavlngd01.nngg.corp:8080/almis/toms.git TAG-39
> git config --local --remove-section credential # timeout=10
ERROR: Failed to push tag TAG-39 to Toms
hudson.plugins.git.GitException: Command "git -c core.askpass=true push http://grddesavlngd01.nngg.corp:8080/almis/toms.git TAG-39" returned status code 1:
stdout:
stderr: * About to connect() to proxy 180.16.242.103 port 8080 (#0)

< HTTP/1.1 401 Unauthorized
< Content-Type: text/html; charset=UTF-8
< Set-Cookie: lang=en-US; Path=/; Max-Age=2147483647
< Set-Cookie: i_like_gogits=21e2bb502c6bf8f1; Path=/; HttpOnly
< Set-Cookie: _csrf=_776vIsNeDpq8HOElCg21pjXyzU6MTQ1MzQ1NzkxNDgzNTM3MjM0Ng%3D%3D; Path=/
< WWW-Authenticate: Basic realm="."
< Date: Fri, 22 Jan 2016 10:18:34 GMT
< X-Cache: MISS from bvmnglappmd01
< Transfer-Encoding: chunked
< Via: 1.1 bvmnglappmd01 (squid/3.5.9)
< Connection: keep-alive
<

< HTTP/1.1 401 Unauthorized
< Content-Type: text/plain
< Set-Cookie: lang=en-US; Path=/; Max-Age=2147483647
< Set-Cookie: i_like_gogits=0571ac89753ff346; Path=/; HttpOnly
< Set-Cookie: _csrf=qJdvkeyRG57WN-F1aFwpuRF6tqw6MTQ1MzQ1NzkxNDg4NjkxMjIzNg%3D%3D; Path=/
< Date: Fri, 22 Jan 2016 10:18:35 GMT
< Content-Length: 13
< X-Cache: MISS from bvmnglappmd01
< Via: 1.1 bvmnglappmd01 (squid/3.5.9)
< Connection: keep-alive

  • The requested URL returned error: 401
  • Closing connection #0
  • About to connect() to proxy 180.16.242.103 port 8080 (#0)
  • Trying 180.16.242.103... * Connected to 180.16.242.103 (180.16.242.103) port 8080 (#0)
    > GET http://grddesavlngd01.nngg.corp:8080/almis/toms.git/info/refs HTTP/1.1
    User-Agent: git/1.7.1
    Host: grddesavlngd01.nngg.corp:8080
    Accept: /
    Proxy-Connection: Keep-Alive
    Pragma: no-cache

< HTTP/1.1 200 OK
< Accept-Ranges: bytes
< Cache-Control: no-cache, max-age=0, must-revalidate
< Content-Length: 295
< Content-Type: text/plain; charset=utf-8
< Expires: Fri, 01 Jan 1980 00:00:00 GMT
< Last-Modified: Fri, 22 Jan 2016 10:18:35 GMT
< Pragma: no-cache
< Set-Cookie: lang=en-US; Path=/; Max-Age=2147483647
< Set-Cookie: i_like_gogits=5ebf987a8afeb55c; Path=/; HttpOnly
< Set-Cookie: _csrf=uCARWJUF8TYXFcXcPTpWLdX0s_E6MTQ1MzQ1NzkxNTA5MTYyNzkwMQ%3D%3D; Path=/
< Date: Fri, 22 Jan 2016 10:18:35 GMT
< X-Cache: MISS from bvmnglappmd01
< Via: 1.1 bvmnglappmd01 (squid/3.5.9)
< Connection: keep-alive
<

  • Connection #0 to host 180.16.242.103 left intact
  • Re-using existing connection! (#0) with host 180.16.242.103
  • Connected to 180.16.242.103 (180.16.242.103) port 8080 (#0)
    > GET http://grddesavlngd01.nngg.corp:8080/almis/toms.git/HEAD HTTP/1.1
    User-Agent: git/1.7.1
    Host: grddesavlngd01.nngg.corp:8080
    Accept: /
    Proxy-Connection: Keep-Alive
    Pragma: no-cache
  • The requested URL returned error: 404 Not Found
  • Expire cleared
  • Closing connection #0
  • About to connect() to proxy 180.16.242.103 port 8080 (#0)
  • Trying 180.16.242.103... * Connected to 180.16.242.103 (180.16.242.103) port 8080 (#0)
    > PROPFIND http://grddesavlngd01.nngg.corp:8080/almis/toms.git/ HTTP/1.1
    User-Agent: git/1.7.1
    Host: grddesavlngd01.nngg.corp:8080
    Accept: /
    Proxy-Connection: Keep-Alive
    Depth: 0
    Content-Type: text/xml
    Content-Length: 182
    Expect: 100-continue

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1693)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1441)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:62)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$8.execute(CliGitAPIImpl.java:1769)
at hudson.plugins.git.GitPublisher.perform(GitPublisher.java:306)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1047)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
at hudson.model.Run.execute(Run.java:1763)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Build step 'Git Publisher' marked build as failure

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

mark.earl.waite@gmail.com (JIRA)

unread,
Jan 23, 2016, 11:39:02 AM1/23/16
to jenkinsc...@googlegroups.com
Mark Waite resolved as Cannot Reproduce
 

The red text in the picture "Git_config.PNG" seems to indicate that the credentials you assigned to that repository don't actually allow access to the repository. Until that red text is gone, I would expect attempts to push to the repository to fail.

Change By: Mark Waite
Status: Open Resolved
Resolution: Cannot Reproduce

limkinpablo@gmail.com (JIRA)

unread,
Jan 23, 2016, 1:09:01 PM1/23/16
to jenkinsc...@googlegroups.com
Pablo Vidal commented on Bug JENKINS-32570
 
Re: Error push new tag to git repository

Thanks for answer, i put the same credenciales in a git sell command and it's ok. Furtheremore, the clone repository step is success.

I think, the error is when i try to push the tag

limkinpablo@gmail.com (JIRA)

unread,
Jan 23, 2016, 1:12:01 PM1/23/16
to jenkinsc...@googlegroups.com
Pablo Vidal reopened an issue
 

Reopen that issue

Change By: Pablo Vidal
Resolution: Cannot Reproduce
Status: Resolved Reopened

mark.earl.waite@gmail.com (JIRA)

unread,
Jan 23, 2016, 1:33:03 PM1/23/16
to jenkinsc...@googlegroups.com
Mark Waite commented on Bug JENKINS-32570
 
Re: Error push new tag to git repository

As far as I can tell, the plugin is using credentials as expected when it pushes a tag. I do not have a proxy between my test instance and github.com, so I cannot test the proxy case that you seem to be using, but in my case, it definitely works to push a tag to the github.com repository.

Steps I took to confirm it is working:

  1. Create a freestyle job "JENKINS-32570-https-fails-to-push-tags"
  2. Use git as the SCM for the job, with https://github.com/MarkEWaite/JENKINS-26197.git as the repository URL and my GitHub user name and access token as password
  3. Define the "Branch to build" as "JENKINS-32570"
  4. Add an Ant build step to execute the default goal (which will increment build.number)
  5. Add Git Publisher post build action to create and update and push a tag named {{JENKINS-32570 ran $ {BUILD_ID}

    }}, pushed to the Target remote name "origin"

If you refer to https://github.com/MarkEWaite/JENKINS-26197/releases, you'll see the tags which I pushed through that job.

mark.earl.waite@gmail.com (JIRA)

unread,
Jan 23, 2016, 1:33:03 PM1/23/16
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-32570
As far as I can tell, the plugin is using credentials as expected when it pushes a tag.  I do not have a proxy between my test instance and github.com, so I cannot test the proxy case that you seem to be using, but in my case, it definitely works to push a tag to the github.com repository.

Steps I took to confirm it is working:

# Create a freestyle job "JENKINS-32570-https-fails-to-push-tags"
# Use git as the SCM for the job, with https://github.com/MarkEWaite/JENKINS-26197.git as the repository URL and my GitHub user name and access token as password
# Define the "Branch to build" as "JENKINS-32570"
# Add an Ant build step to execute the default goal (which will increment build.number)
#  Add Git Publisher post build action to create and update and push a tag named {
{ noformat} JENKINS-32570-ran-${BUILD_ID} {noformat } } , pushed to the Target remote name "origin"


If you refer to https://github.com/MarkEWaite/JENKINS-26197/releases, you'll see the tags which I pushed through that job.

mark.earl.waite@gmail.com (JIRA)

unread,
Jan 23, 2016, 1:44:05 PM1/23/16
to jenkinsc...@googlegroups.com
Mark Waite resolved as Fixed
 
Change By: Mark Waite
Status: Reopened Resolved
Resolution: Fixed

mark.earl.waite@gmail.com (JIRA)

unread,
Jan 23, 2016, 2:02:06 PM1/23/16
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-32570
As far as I can tell, the plugin is using credentials as expected when it pushes a tag.  I do not have a proxy between my test instance and github.com, so I cannot test the proxy case that you seem to be using, but in my case, it definitely works to push a tag to the github.com repository.

Steps I took to confirm it is working:

# Create a freestyle job "JENKINS-32570-https-fails-to-push-tags"
# Use git as the SCM for the job, with https://github.com/MarkEWaite/JENKINS-26197.git as the repository URL and my GitHub user name and access token as password
# Define the "Branch to build" as "JENKINS-32570"
# Add an Ant build step to execute the default goal (which will increment build.number  and commit the new build.number file to the local git repo )
#  Add Git Publisher post build action to
 push that change and to  create and  update and  push a tag named {noformat}JENKINS-32570-ran-${BUILD_ID}{noformat}, pushed to the Target remote name "origin"


If you refer to https://github.com/MarkEWaite/JENKINS-26197/releases, you'll see the tags which I pushed through that job.
Reply all
Reply to author
Forward
0 new messages