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

Projects are checked out over HTTPs after updating to 1.4.4

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • Jenkins 2.220 with gitlab-branch-source-plugin 1.4.4

      After updating the gitlab-branch-source-plugin to 1.4.4 all our projects get checked out through HTTPS. Before the update git was using ssh.

      We provided an ssh key as credentials in the GitLab Group setup.

      The https checkout fails, since checking out over https with an SSH-Key won't work. I Tried working around this by adding "checkout over ssh" as additional checkout behavior without success.

      Going back to 1.4.3 fixes the issue.

      This is the output after the update:

       

      using credential 449978db-7bbd-436e-b3c3-ea4e5051e7fe
      Fetching changes from the remote Git repository
      Fetching without tags
       > git rev-parse --is-inside-work-tree # timeout=10
       > git config remote.origin.url https://my-gitlab/group/project.git  # timeout=10
      Fetching upstream changes from https://my-gitlab/group/project.git 
       > git --version # timeout=10
      using GIT_SSH to set credentials Gitlab Key - in Gitlab als Jenkins-New Deploy Key hinterlegt
       > git fetch --no-tags --progress https://my-gitlab/group/project.git +refs/heads/master:refs/remotes/origin/master # timeout=10
      ERROR: Error fetching remote repo 'origin'
      hudson.plugins.git.GitException: Failed to fetch from https://my-gitlab/group/project.git 
      	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:908)
      	at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1123)
      	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1159)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:124)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:93)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:80)
      	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
      	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:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: hudson.plugins.git.GitException: Command "git fetch --no-tags --progress https://my-gitlab/group/project.git  +refs/heads/master:refs/remotes/origin/master" returned status code 128:
      stdout: 
      stderr: fatal: Authentication failed for 'https://my-gitlab/group/project.git'
      

      And this was the output before updating to 1.4.4 with exactly the same configuration:

      using credential 449978db-7bbd-436e-b3c3-ea4e5051e7fe
      Fetching changes from the remote Git repository
      Fetching without tags
       > git rev-parse --is-inside-work-tree # timeout=10
       > git config remote.origin.url git@my-gitlab:group/myproject.git # timeout=10
      Fetching upstream changes from git@my-gitlab:group/myproject.git
       > git --version # timeout=10
      using GIT_SSH to set credentials Gitlab Key - in Gitlab als Jenkins-New Deploy Key hinterlegt
       > git fetch --no-tags --progress git@my-gitlab:group/myproject.git +refs/heads/master:refs/remotes/origin/master # timeout=10
      Checking out Revision b5bb9a91e2c7d7fcd6a81a111fd2f3f2942b5d57 (master)
       > git config core.sparsecheckout # timeout=10
       > git checkout -f b5bb9a91e2c7d7fcd6a81a111fd2f3f2942b5d57 # timeout=10
      Commit message: "Don't build on weekends"
       > git rev-list --no-walk b5bb9a91e2c7d7fcd6a81a111fd2f3f2942b5d57 # timeout=10
      

            baymac Parichay Barpanda
            gtudan Gregor Tudan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: