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

Jenkins jobs using a different git cred that what's configured

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • git-plugin
    • None
    • Jenkins 2.249.3
      Running on Kubernetes 1.19.10
      Using the jenkins/jenkins:2.249.3 docker image

      Configured Git Credential ID: identity-ids

      Actually Used Git Credential ID: github-svc-sbseg-ci

      We have seen twice now that some of our multibranch pipeline jobs started using a different git credential to clone from git compared to what is configured in the multibranch pipeline. The scan repo log for the pipeline shows the the identity-ius credential is being used (screenshot attached) but the git clone within the actual pipeline jobs are using the values contained in the github-svc-sbseg-ci credential id. We validated this by checking the GitHub logs on our side (we host our own Github Enterprise server). 

      This has happened at least twice now. The first time we fixed this by doing the following

      1. Deleted all cache related items from the Jenkins home directory

      rm -rf $JENKINS_HOME/caches/* $JENKINS_HOME/org.jenkinsci.plugins.github_branch_source.GitHubSCMProbe.cache/* $JENKINS_HOME/org.jenkinsci.plugins.github.GitHubPlugin.cache/*
      

      2. Performing a hard restart of Jenkins (restarting the Jenkins process). We initially tried doing a soft restart (using the /restart url), but that did not work. 

      When viewing each of the credentials in the Jenkins UI, Jenkins correctly lists which jobs are associated with the credential. We are only seeing the mixup with the jobs are run. This is happening in both our multibranch pipelines and the test freestyle job I setup. 

      At this point we have not done a hard restart on this Jenkins yet and can collect any additional info that may be helpful. We are planning to restart it in a couple of days though to clean this up. 

            Unassigned Unassigned
            mikenau_intuit Mike Nau
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: