[JIRA] (JENKINS-36958) Multi-branch maven project can't fetch Gitlab code using Multi-Branch Project Plugin" <https://wiki.jenkins-ci.org/display/JENKINS/Multi-Branch+Project+Plugin>.

5 views
Skip to first unread message

john.aylward@sagenet.com (JIRA)

unread,
Jul 26, 2016, 11:58:04 AM7/26/16
to jenkinsc...@googlegroups.com
john aylward created an issue
 
Jenkins / Task JENKINS-36958
Multi-branch maven project can't fetch Gitlab code using Multi-Branch Project Plugin" <https://wiki.jenkins-ci.org/display/JENKINS/Multi-Branch+Project+Plugin>.
Issue Type: Task Task
Assignee: Owen Mehegan
Components: gitlab-plugin, multi-branch-project-plugin
Created: 2016/Jul/26 3:57 PM
Environment: GitLab: 7.10.1
Jenkins: 1.640
Multi-branch-plugin: 0.4.1
GitLab Plugin: 1.1.28
Git: 1.9.1
Labels: jenkins plugin
Priority: Major Major
Reporter: john aylward

logs:
{{Setting origin to git@gitlab:gitrepo.git
Fetching origin...
FATAL: Failed to recompute children of Sync Branches
hudson.plugins.git.GitException: org.eclipse.jgit.api.errors.TransportException: git@gitlab:gitrepo.git: Failed to connect
at org.jenkinsci.plugins.gitclient.JGitAPIImpl.fetch(JGitAPIImpl.java:680)
at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:171)
at jenkins.scm.api.SCMSource.fetch(SCMSource.java:143)
at jenkins.scm.api.SCMSource.retrieve(SCMSource.java:219)
at jenkins.scm.api.SCMSource.fetch(SCMSource.java:169)
at com.github.mjdetullio.jenkins.plugins.multibranch.AbstractMultiBranchProject.computeChildren(AbstractMultiBranchProject.java:582)
at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:151)
at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:106)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: org.eclipse.jgit.api.errors.TransportException: g...@srv-lab-t-401.zhaw.ch:cyclops/cyclops-prediction.git: Failed to connect
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:139)
at org.jenkinsci.plugins.gitclient.JGitAPIImpl.fetch(JGitAPIImpl.java:678)
... 9 more
Caused by: org.eclipse.jgit.errors.TransportException: g...@srv-lab-t-401.zhaw.ch:cyclops/cyclops-prediction.git: Failed to connect
at org.jenkinsci.plugins.gitclient.trilead.TrileadSessionFactory.getSession(TrileadSessionFactory.java:54)
at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:136)
at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:262)
at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:161)
at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136)
at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122)
at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1138)
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:130)
... 10 more
Caused by: java.io.IOException: There was a problem while connecting to srv-lab-t-401.zhaw.ch:22
at com.trilead.ssh2.Connection.connect(Connection.java:818)
at com.trilead.ssh2.Connection.connect(Connection.java:687)
at com.trilead.ssh2.Connection.connect(Connection.java:587)
at org.jenkinsci.plugins.gitclient.trilead.TrileadSessionFactory.getSession(TrileadSessionFactory.java:29)
... 17 more
Caused by: java.io.IOException: Key exchange was not finished, connection is closed.
at com.trilead.ssh2.transport.KexManager.getOrWaitForConnectionInfo(KexManager.java:93)
at com.trilead.ssh2.transport.TransportManager.getConnectionInfo(TransportManager.java:230)
at com.trilead.ssh2.Connection.connect(Connection.java:770)
... 20 more
Caused by: java.io.IOException: Cannot negotiate, proposals do not match.
at com.trilead.ssh2.transport.KexManager.handleMessage(KexManager.java:405)
at com.trilead.ssh2.transport.TransportManager.receiveLoop(TransportManager.java:777)
at com.trilead.ssh2.transport.TransportManager$1.run(TransportManager.java:489)
at java.lang.Thread.run(Thread.java:745)
Finished: FAILURE}}

The same git repository and credentials works fine for a single maven project. Could it be because private gitlab configurations? unfortunately I don't have an access for gitlab server. but as it works for single maven project and doesn't for multi branch I consider it as a bug.

Thanks a lot for a help!
best regards,
Oleksii

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

john.aylward@sagenet.com (JIRA)

unread,
Jul 26, 2016, 12:00:01 PM7/26/16
to jenkinsc...@googlegroups.com
john aylward updated an issue
Change By: john aylward
Environment: GitLab: 7 8 .10 .1
Jenkins:
1 2 . 640 15
Multi-branch-plugin Branch API Plugin : 0.4. 1
.10
GitLab Plugin: 1. 3.0
Git Plugin 2.5.2
Git client plugin:
1. 28 19.7
Git: 1.9.1

john.aylward@sagenet.com (JIRA)

unread,
Jul 26, 2016, 12:02:01 PM7/26/16
to jenkinsc...@googlegroups.com
john aylward updated an issue
Change By: john aylward
Environment: GitLab: 8.10 .1
Jenkins: 2.15
Branch API Plugin: 1.10
GitLab Plugin: 1.3.0
Git Plugin 2.5.2
Git client plugin: 1.19.7
Git: 1.9.1

Git and Jenkins servers running Ubuntu 14.04.4 LTS

john.aylward@sagenet.com (JIRA)

unread,
Jul 26, 2016, 12:04:01 PM7/26/16
to jenkinsc...@googlegroups.com
john aylward updated an issue
logs:
{{Setting origin to git@gitlab:gitrepo.git
Fetching origin...
FATAL: Failed to recompute children of
Sync Branches bob
hudson.plugins.git.GitException: org.eclipse.jgit.api.errors.TransportException: git@
gitlab:gitrepo git . server/repo. git: Failed to connect
at org.jenkinsci.plugins.gitclient.JGitAPIImpl.fetch(JGitAPIImpl.java:680)
at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:
171 208 )
at jenkins.scm.api.SCMSource.fetch(SCMSource.java:
143 146 )
at jenkins.
scm branch . api MultiBranchProject . SCMSource.retrieve(SCMSource.java:219)
at jenkins.scm.api.SCMSource.fetch(SCMSource.java:169)
at com.github.mjdetullio.jenkins.plugins.multibranch.AbstractMultiBranchProject.
computeChildren( AbstractMultiBranchProject MultiBranchProject .java: 582 294 )
at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:
151 157 )
at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:
106 122 )
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:
410 404 )
Caused by: org.eclipse.jgit.api.errors.TransportException: git@
srv-lab-t-401 git . zhaw.ch:cyclops server / cyclops-prediction repo .git: Failed to connect

at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:139)
at org.jenkinsci.plugins.gitclient.JGitAPIImpl.fetch(JGitAPIImpl.java:678)
... 9 7 more
Caused by: org.eclipse.jgit.errors.TransportException: git@
srv-lab-t-401 git . zhaw.ch:cyclops server / cyclops-prediction repo .git: Failed to connect

at org.jenkinsci.plugins.gitclient.trilead.TrileadSessionFactory.getSession(TrileadSessionFactory.java:54)
at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:136)
at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:262)
at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:161)
at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136)
at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122)
at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1138)
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:130)
... 10 8 more
Caused by: java.io.IOException: There was a problem while connecting to
srv-lab-t-401 git . zhaw snet . ch local :22

at com.trilead.ssh2.Connection.connect(Connection.java:818)
at com.trilead.ssh2.Connection.connect(Connection.java:687)
at com.trilead.ssh2.Connection.connect(Connection.java:587)
at org.jenkinsci.plugins.gitclient.trilead.TrileadSessionFactory.getSession(TrileadSessionFactory.java:29)
... 17 15 more

Caused by: java.io.IOException: Key exchange was not finished, connection is closed.
at com.trilead.ssh2.transport.KexManager.getOrWaitForConnectionInfo(KexManager.java:93)
at com.trilead.ssh2.transport.TransportManager.getConnectionInfo(TransportManager.java:230)
at com.trilead.ssh2.Connection.connect(Connection.java:770)
... 20 18 more

Caused by: java.io.IOException: Cannot negotiate, proposals do not match.
at com.trilead.ssh2.transport.KexManager.handleMessage(KexManager.java:405)
at com.trilead.ssh2.transport.TransportManager.receiveLoop(TransportManager.java:777)
at com.trilead.ssh2.transport.TransportManager$1.run(TransportManager.java:489)
at java.lang.Thread.run(Thread.java:745)
Finished: FAILURE
}}


The same git repository and credentials works fine for a single maven project. Could it be because  private gitlab configurations? unfortunately I don't have an access for gitlab server. but as it works for single maven project and doesn't for multi branch I consider it as a bug.

Thanks a lot for a help!
best regards,
Oleksii

john.aylward@sagenet.com (JIRA)

unread,
Jul 26, 2016, 12:07:02 PM7/26/16
to jenkinsc...@googlegroups.com
john aylward commented on Task JENKINS-36958
 
Re: Multi-branch maven project can't fetch Gitlab code using Multi-Branch Project Plugin" <https://wiki.jenkins-ci.org/display/JENKINS/Multi-Branch+Project+Plugin>.

I have a feeling this is similar JENKINS-33021. If I update my server to have weaker algorithms, the connection works. This is not a problem when using the git plugin directly, it only happens when using the "Multi-branch" plugin. I'm not sure why this plugin isn't using the git plugin as a dependency directly, but that appears to be the case since the git plugin by itself works.

john.aylward@sagenet.com (JIRA)

unread,
Jul 26, 2016, 12:08:03 PM7/26/16
to jenkinsc...@googlegroups.com

john.aylward@sagenet.com (JIRA)

unread,
Jul 26, 2016, 12:09:03 PM7/26/16
to jenkinsc...@googlegroups.com
john aylward updated an issue
Change By: john aylward
Environment: GitLab: 8.10.1

Jenkins: 2.15
Branch API Plugin: 1.10
GitLab Plugin: 1.3.0
Git Plugin 2.5.2
Git client plugin: 1.19.7
Git: 1.9.1
Pipeline: Multibranch: 2.8

Git and Jenkins servers running Ubuntu 14.04.4 LTS

john.aylward@sagenet.com (JIRA)

unread,
Jul 26, 2016, 12:12:01 PM7/26/16
to jenkinsc...@googlegroups.com

john.aylward@sagenet.com (JIRA)

unread,
Jul 26, 2016, 12:12:01 PM7/26/16
to jenkinsc...@googlegroups.com

mark.earl.waite@gmail.com (JIRA)

unread,
Jul 26, 2016, 12:24:01 PM7/26/16
to jenkinsc...@googlegroups.com

mark.earl.waite@gmail.com (JIRA)

unread,
Jul 26, 2016, 12:38:01 PM7/26/16
to jenkinsc...@googlegroups.com
Mark Waite commented on Bug JENKINS-36958
 
Re: Multi-branch maven project can't fetch Gitlab code using Multi-Branch Project Plugin" <https://wiki.jenkins-ci.org/display/JENKINS/Multi-Branch+Project+Plugin>.

john aylward you may be able to assist with the diagnosis of the problem by defining a Jenkins job which is a copy of one of your working jobs, but then uses JGit instead of command line git as the git implementation in the job.

You may need to enable JGit as a valid implementation (find the "Git" button in the global tools configuration, then add "jgit" as a valid implementation in addition to the default of command line git).

I suspect that the job with JGit will fail to authenticate in your case, while the command line git job will continue to work as you noted. If that is the case, then you might want to help evaluate git plugin pull request 424 which proposes to switch to use the selected git implementation for multi-branch instead of always using JGit.

mark.earl.waite@gmail.com (JIRA)

unread,
Jul 26, 2016, 12:40:01 PM7/26/16
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-36958
[~johnjaylward] you may be able to assist with the diagnosis of the problem by defining a Jenkins job (a freestyle job, not a pipeline job) which is a copy of one of your working freestyle jobs, but then uses JGit instead of command line git as the git implementation in the job.


You may need to enable JGit as a valid implementation (find the "Git" button in the global tools configuration, then add "jgit" as a valid implementation in addition to the default of command line git).

I suspect that the job with JGit will fail to authenticate in your case, while the command line git job will continue to work as you noted.  If that is the case, then you might want to help evaluate [git plugin pull request 424|https://github.com/jenkinsci/git-plugin/pull/424] which proposes to switch to use the selected git implementation for multi-branch instead of always using JGit.

john.aylward@sagenet.com (JIRA)

unread,
Jul 26, 2016, 2:30:01 PM7/26/16
to jenkinsc...@googlegroups.com

Mark Waite. I tried using the JGit implementation like you stated and that is the case that my "freestyle" job now fails to fetch.

john.aylward@sagenet.com (JIRA)

unread,
Jul 26, 2016, 2:33:02 PM7/26/16
to jenkinsc...@googlegroups.com
john aylward edited a comment on Bug JENKINS-36958
[~markewaite]. I tried using the JGit implementation like you stated and that is the case that my "freestyle" job now fails to fetch.

The Jenkins instance involved though is one used for deployments to production, so I'm not sure I can evaluate the pull request mentioned. I doubt that I will have time to set up my own Jenkins instance to test it either.

Thanks for the heads up on that.
Reply all
Reply to author
Forward
0 new messages