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

SCM polling not using correct user credentials

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • git-plugin
    • None
    • Jenkins 1.596.2
      Git Client Plugin 1.16.1
      Git Plugin 1.16.1
      Server running as a docker container (using custom image not "jenkins")

      I deployed Jenkins as a docker container using a custom image. (I am using a custom image so my Jeknins server can build docker images.)

      I set up a Jenkins plan to build my git repo when it is changed. I set up repository polling as a trigger for the plan. The git repository is accessed via SSH.

      The plan itself works fine when triggered manually. But detecting changes in the repository fails.

      I checked the Poll-Log using the http://jenkinshost/job/jobname/scmPollLog endpoint and found a "permission denied" error. This was strange as the plan could checkout and build the repository when started manually.

      To authenticate with the git server I am using a key pair located in JENKINS_HOME/.ssh/. I do not use a key pair located in the user home (= default location) as I want to keep my keys when the docker container gets restarted.

      I was able to fixe my problem by logging in the container and creating a new key pair in the default location. When adding this pair to the allowed keys on the git server repository polling works.

      This makes me believe that the git plugin in is ignoring the key pair configured with the plan.

            ndeloof Nicolas De Loof
            tkremer Tobias Kremer
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: