Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-21116

Git Publisher does not use Credentials

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Labels:
      None
    • Environment:
      Debian Wheezy with Jetty, Jenkins v1.541, git plugin 2.0, git-client 1.6.0, credentials plugin 1.9.4
    • Similar Issues:

      Description

      It seems that the GIT-Publisher does not use those credentials that are set for the repo.

      Checkout/Clone at the beginning of a job works fine and uses the set credentials.

      Fetching changes from the remote Git repository
      Fetching upstream changes from git@gi-server.tld/project.git
      using GIT_SSH to set credentials WRITE permissions for gitlab
      Checking out Revision XXXX (origin/SOME_BRANCH)
      

      As soon as I want the job to push a tag with GIT-Publisher, it fails since it does not use those credentials.

      [Boolean condition] checking [true] against [^(1|y|yes|t|true|on|run)$] (origin token: true)
      Run condition [Boolean condition] enabling perform for step [Git Publisher]
      Pushing tag job-name-release-296 to repo origin
      ERROR: Failed to push tag job-name-release-296 to origin
      hudson.plugins.git.GitException: Command "git push git@git-server.tld/project.git job-name-release-296" returned status code 128:
      stdout: 
      stderr: Access denied.
      fatal: The remote end hung up unexpectedly
      
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1099)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:985)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.push(CliGitAPIImpl.java:1123)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.push(CliGitAPIImpl.java:1135)
      	at hudson.plugins.git.GitAPI.push(GitAPI.java:65)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:616)
      	at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:274)
      	at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:255)
      	at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:287)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at hudson.remoting.Engine$1$1.run(Engine.java:60)
      	at java.lang.Thread.run(Thread.java:679)
      Build step 'Flexible publish' changed build result to FAILURE
      

      This issue, together with JENKINS-21110 renders the GIT-Publisher rather unusable.

        Attachments

          Activity

            People

            • Assignee:
              markewaite Mark Waite
              Reporter:
              der_do Udo Waechter
            • Votes:
              2 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: