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

Push notification from pipeline repositories doesnt take credentials

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • git-plugin
    • None
    • Jenkins 2.16, git-plugin 2.5.3 (also tested on 3.0.0b2)

      Setting up a Pipeline Job on a new Jenkins installation shows some problems with push notifications.
      The job ist configured to pull a Repository containing the Jenkinsfile and -scripts.
      The script checks out 4 git repositories, a single one is configured to affect changelog and polling.

      Interestingly (and as afar as i know undocumented) the webhook would work - I dont know how exactly and under what circumstances ( I guess a previously successfull build?).

      But the polling then fails to use the credentials that where previously used (it seems to somehow store the correct path and browser).

      1. Its unclear to me me, if this scheme should even work, and what the recommended practice would be. In the job configuration I have to specify the repository with the Jenkins-files (which ideally would not end up polled or in the changelog). The I have a cannonical repository that should be polled, which gets cloned/pulled from the former scripts
      2. The webhook kinda works, but some information (path, browser) seems to be saved and atleast the credentials seem to be missing. On a different Jenkins server it works, likely because added a ssh key to the linux-account runninng jenkins
      3. Seems to be impossible to disable polling for the repository configured in the job directly

      Here are the logs:

      Web hook response

      Scheduled polling of hugo
      No Git consumers using SCM API plugin for: ssh://git@localhost:10022/poe.git
      

      Git Polling Log

      Started on Aug 3, 2016 10:51:09 PM
      Using strategy: Default
      [poll] Last Built Revision: Revision f5985f5130f66127bdf5f05b746b80c92f7265d4 (refs/remotes/origin/master)
      using GIT_SSH to set credentials 
       > git ls-remote -h ssh://git@localhost:10022/jobscripts.git # timeout=10
      Found 1 remote heads on ssh://git@localhost:10022/jobscripts.git
      [poll] Latest remote head revision on refs/heads/master is: f5985f5130f66127bdf5f05b746b80c92f7265d4 - already built by 7
      no polling baseline in /tmp/jblue/workspace/hugo/jenkins-jobscripts on main
      Using strategy: Default
      [poll] Last Built Revision: Revision fa4a4f443d9f5a40b3021e70cfca343508c55609 (refs/remotes/origin/master)
       > git ls-remote -h ssh://git@localhost:10022/poe.git # timeout=10
      ERROR: polling failed in /tmp/jblue/workspace/hugo/poe on main
      java.io.IOException: hudson.plugins.git.GitException: Command "git ls-remote -h ssh://git@localhost:10022/poe.git" returned status code 128:
      stdout: 
      stderr: Permission denied (publickey,keyboard-interactive).
      fatal: Could not read from remote repository.
      
      Please make sure you have the correct access rights
      and the repository exists.
      
      	at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:574)
      	at org.jenkinsci.plugins.workflow.job.WorkflowJob.poll(WorkflowJob.java:618)
      	at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:528)
      	at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:574)
      	at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:119)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: hudson.plugins.git.GitException: Command "git ls-remote -h ssh://git@localhost:10022/poe.git" returned status code 128:
      stdout: 
      stderr: Permission denied (publickey,keyboard-interactive).
      fatal: Could not read from remote repository.
      
      Please make sure you have the correct access rights
      and the repository exists.
      
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1735)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1478)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1402)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1393)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:2444)
      	at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:613)
      	at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:572)
      	... 9 more
      no polling baseline in /tmp/jblue/workspace/hugo/hipase-firmware on main
      no polling baseline in /tmp/jblue/workspace/hugo/hipase-buildscripts on main
      Done. Took 0.15 sec
      No changes
      

            Unassigned Unassigned
            nolange79 Norbert Lange
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: