Multi-branch pipeline clone problem

290 views
Skip to first unread message

Michal Medvecky

unread,
Jul 20, 2016, 2:24:10 PM7/20/16
to Jenkins Users
Hello,

I have set up a multi-branch pipeline job and trying to run Branch indexing. It does not work, with this result:
 
Started by user jenkins
Setting origin to git@myserver:mycompany/myrepo.git
Fetching origin...
FATAL: Failed to recompute children of myrepo
hudson.plugins.git.GitException: org.eclipse.jgit.api.errors.InvalidRemoteException: Invalid remote: origin
	at org.jenkinsci.plugins.gitclient.JGitAPIImpl.fetch(JGitAPIImpl.java:680)
	at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:174)
	at jenkins.scm.api.SCMSource.fetch(SCMSource.java:146)
	at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:294)
	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:157)
	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:122)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:410)
Caused by: org.eclipse.jgit.api.errors.InvalidRemoteException: Invalid remote: origin
	at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:136)
	at org.jenkinsci.plugins.gitclient.JGitAPIImpl.fetch(JGitAPIImpl.java:678)
	... 7 more
Caused by: org.eclipse.jgit.errors.NoRemoteRepositoryException: git@myserver:mycompany/myrepo.git: GitLab: The project you were looking for could not be found.

	at org.eclipse.jgit.transport.TransportGitSsh.cleanNotFound(TransportGitSsh.java:208)
	at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:288)
	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)
	... 8 more
Finished: FAILURE

Repository of course exists and is perfectly clonable using jenkins credentials.

Any hints please?

Jenkins 1.651.3 with latest plugins.

Michal

Mark Waite

unread,
Jul 20, 2016, 3:11:47 PM7/20/16
to Jenkins Users
Since the stack trace includes a reference to JGit, you might try switching your freestyle job that authenticates successfully from using the default (command line git) implementation to instead use the jgit implementation.  If the job doesn't authenticate using JGit, then it may indicate some difference between JGit and command line git authentication.

If the JGit implementation is not enabled in your system, you can enable it from the "Manage Jenkins" link, and its "Configure System" link.  There will be a "Git" button in that page, where you can add "JGit" as one of the git implementations.

Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/852cabf9-287b-4cae-aa6d-21974d77d7a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michal Medvecky

unread,
Jul 20, 2016, 3:35:08 PM7/20/16
to jenkins...@googlegroups.com
On Wed, Jul 20, 2016 at 9:11 PM, Mark Waite <mark.ea...@gmail.com> wrote:
Since the stack trace includes a reference to JGit, you might try switching your freestyle job that authenticates successfully from using the default (command line git) implementation to instead use the jgit implementation.  If the job doesn't authenticate using JGit, then it may indicate some difference between JGit and command line git authentication.

Well I'm not aware of using jgit - system configuration only refers to default git, not jgit.   

If the JGit implementation is not enabled in your system, you can enable it from the "Manage Jenkins" link, and its "Configure System" link.  There will be a "Git" button in that page, where you can add "JGit" as one of the git implementations.

When I add jgit, nothing changes. 

How do I force jenkins or the job NOT to use jgit? 


Michal

Mark Waite

unread,
Jul 20, 2016, 3:54:58 PM7/20/16
to jenkins...@googlegroups.com
On Wed, Jul 20, 2016 at 1:35 PM Michal Medvecky <medv...@pexe.so> wrote:
On Wed, Jul 20, 2016 at 9:11 PM, Mark Waite <mark.ea...@gmail.com> wrote:
Since the stack trace includes a reference to JGit, you might try switching your freestyle job that authenticates successfully from using the default (command line git) implementation to instead use the jgit implementation.  If the job doesn't authenticate using JGit, then it may indicate some difference between JGit and command line git authentication.

Well I'm not aware of using jgit - system configuration only refers to default git, not jgit.   

If you want to use JGit in your jobs (compared to the plugins, which can use it any time), then you must click the "Git" button and use the "Add" button in that section to add "JGit" as one of the allowed implementations of git.
 

If the JGit implementation is not enabled in your system, you can enable it from the "Manage Jenkins" link, and its "Configure System" link.  There will be a "Git" button in that page, where you can add "JGit" as one of the git implementations.

When I add jgit, nothing changes. 


It is not enough to add jgit, you also need to change one or more of your freestyle jobs that currently use the default (command line) git implementation to use the jgit implementation.  That is a git implementation selection ("Git executable") available in your job definition page after you've enabled jgit.
 
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages