[JIRA] (JENKINS-61144) Projects are checked out over HTTPs after updating to 1.4.4

10 views
Skip to first unread message

gregor@tudan.de (JIRA)

unread,
Feb 19, 2020, 5:33:03 AM2/19/20
to jenkinsc...@googlegroups.com
Gregor Tudan created an issue
 
Jenkins / Bug JENKINS-61144
Projects are checked out over HTTPs after updating to 1.4.4
Issue Type: Bug Bug
Assignee: Parichay Barpanda
Components: gitlab-branch-source-plugin
Created: 2020-02-19 10:32
Environment: Jenkins 2.220 with gitlab-branch-source-plugin 1.4.4
Priority: Minor Minor
Reporter: Gregor Tudan

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
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

alvizu@gmail.com (JIRA)

unread,
Mar 31, 2020, 2:37:04 PM3/31/20
to jenkinsc...@googlegroups.com
Dan Alvizu commented on Bug JENKINS-61144
 
Re: Projects are checked out over HTTPs after updating to 1.4.4

This looks like a duplicate of JENKINS-59753. We are seeing it on 1.4.3 and it is also reported in 1.4.0 so I don't believe this is a result of upgrading.

 

A work-around described in another  duplicate ticket is to resave the job:

> We have to open the configuration page and click save to enable again the checkout with SSH.

 

This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

parichay.barpanda@gmail.com (JIRA)

unread,
Apr 3, 2020, 5:52:03 PM4/3/20
to jenkinsc...@googlegroups.com
Parichay Barpanda started work on Bug JENKINS-61144
 
Change By: Parichay Barpanda
Status: Open In Progress

parichay.barpanda@gmail.com (JIRA)

unread,
Apr 3, 2020, 5:53:03 PM4/3/20
to jenkinsc...@googlegroups.com

parichay.barpanda@gmail.com (JIRA)

unread,
Apr 3, 2020, 5:53:04 PM4/3/20
to jenkinsc...@googlegroups.com

parichay.barpanda@gmail.com (JIRA)

unread,
Apr 3, 2020, 5:53:05 PM4/3/20
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages