jakubgarfield / Bonobo-Git-Server

Bonobo Git Server for Windows is a web application you can install on your IIS and easily manage and connect to your git repositories. Go to homepage for release and more info.
http://bonobogitserver.com
MIT License
1.81k stars 603 forks source link

Jenkins cannot connect to Bonobo (ver ?) with Active Directory login #635

Open bastienlemaitre opened 7 years ago

bastienlemaitre commented 7 years ago

Hi ! I'm using Jenkins with Bonobo Git Server, and received: `Building in workspace C:\Program Files (x86)*****

C:\Program Files (x86)\Git\cmd\git.exe rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository C:\Program Files (x86)\Git\cmd\git.exe config remote.origin.url http://blemaitre:*************@artemis/Bonobo.Git.Server/***************.git # timeout=10 Fetching upstream changes from http://blemaitre@artemis/Bonobo.Git.Server/**************.git C:\Program Files (x86)\Git\cmd\git.exe --version # timeout=10 C:\Program Files (x86)\Git\cmd\git.exe fetch --tags --progress http://blemaitre@artemis/Bonobo.Git.Server/**************git +refs/heads/:refs/remotes/origin/ ERROR: Error fetching remote repo 'origin' hudson.plugins.git.GitException: Failed to fetch from http://blemaitre@artemis/Bonobo.Git.Server/**************.git at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:803) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1063) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1094) at hudson.scm.SCM.checkout(SCM.java:495) at hudson.model.AbstractProject.checkout(AbstractProject.java:1278) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) at hudson.model.Run.execute(Run.java:1728) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:404) Caused by: hudson.plugins.git.GitException: Command "C:\Program Files (x86)\Git\cmd\git.exe fetch --tags --progress http://blemaitre@artemis/Bonobo.Git.Server/***************.git +refs/heads/:refs/remotes/origin/" returned status code 128: stdout: stderr: fatal: Authentication failed for http://blemaitre@artemis/Bonobo.Git.Server/*****************.git/

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1772)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1516)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:67)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:318)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:801)
... 11 more

ERROR: null Finished: FAILURE`

It caused by windows authentication ? Thanks !

alexkuznetsov commented 7 years ago

Hello @bastienlemaitre! I use Jenkins with Bonobo Git server in last year (don't rememver a version) and it works fine! In the settings for the repository I kept full credentials - login and password, the only way for this to work.

bastienlemaitre commented 7 years ago

I've tried to put credentials into the url and into the credentials manager. But nothing append, same error.. Any solutions ?

alexkuznetsov commented 7 years ago

That type of authentication do you use with Bonobo Git Server? \ In may case, i used the forms authentication and it worked. Can you normally clone repository by url like this: http://userName:password@bonobo-git-server/YouGitRepository.git ?

bastienlemaitre commented 7 years ago

I'm using Active Directory Authentication with Bonobo Git Server and Jenkins too.

alexkuznetsov commented 7 years ago

I had not work with that type, can't suggest. So that about my question about cloning? Is it works, when you use credentials in clone url? And - that is most important, is it works on jenkins server, the way then you clone by url with you credentials?

willdean commented 7 years ago

@bastienlemaitre - Are you using Bonobo 5.2 or 6.0? There have been lots of improvements to Bonobo's auth code between 5.2 and 6.0.

If you do upgrade to 6.0 make sure you keep a backup of your complete 5.2 installation in case there are problems with the migration. (And you do have problems with the migration, please come back to us, because we're looking for help testing the AD migration)

Trapulo commented 7 years ago

I tried this some months ago and it didn't work. Same env: bonobo 6.0, AD integration enabled.

larshg commented 7 years ago

@Trapulo and @bastienlemaitre can you please try with the new 6.1 - there are additional logging when a user authenticates against AD etc. Maybe this can give some insight in the failure?