Re: Multi-branch pipeline clone problem

2016-07-20 Thread Mark Waite
On Wed, Jul 20, 2016 at 1:35 PM Michal Medvecky  wrote:

> On Wed, Jul 20, 2016 at 9:11 PM, Mark Waite 
> 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.


> How do I force jenkins or the job NOT to use jgit?
>
> I've found this
> https://issues.jenkins-ci.org/browse/JENKINS-33983?jql=status%20%3D%20Open%20AND%20text%20~%20%22java.lang.IllegalStateException%3A%20Cannot%20%20session%2C%20connection%20is%20not%20authenticated.%22
> but I'm not sure if it's related.
>
> Michal
>
> --
> 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-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/CAB9OJeV92wjpywxNDKqEwxWmDATqtENH-Br7C2q7XPOwXKcnPQ%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtGS1doPiTQvM-zK2PZM_ozLzakodVO-L83P5TWyUetxfg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Multi-branch pipeline clone problem

2016-07-20 Thread Michal Medvecky
On Wed, Jul 20, 2016 at 9:11 PM, Mark Waite 
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?

I've found this
https://issues.jenkins-ci.org/browse/JENKINS-33983?jql=status%20%3D%20Open%20AND%20text%20~%20%22java.lang.IllegalStateException%3A%20Cannot%20%20session%2C%20connection%20is%20not%20authenticated.%22
but I'm not sure if it's related.

Michal

-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAB9OJeV92wjpywxNDKqEwxWmDATqtENH-Br7C2q7XPOwXKcnPQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Multi-branch pipeline clone problem

2016-07-20 Thread Mark Waite
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

On Wed, Jul 20, 2016 at 12:24 PM Michal Medvecky  wrote:

> 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 myrepohudson.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.(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
>
> --
> 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-users+unsubscr...@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
>