Search code examples
gitjenkinsgitblit

From Jenkins, how to access to a secured repository in GitBlit (over http(s))?


I use GitBlit (1.3.2), Jenkins (1.534) on RedHat 6

I created a Git repository on a local GitBlit. Access is restricted to authenticated users. This works fine.

When I try to configure a new job in Jenkins to enable continuous Integration, I enter the Git repository URL as follow:

http://jenkins@myhost.local/gitblit/git/testing/secured_repo.git

I received the error message below and I don't know where to set the jenkins's password...

Failed to connect to repository : Failed to connect to http://jenkins@myhost.local/gitblit/git/testing/secured_repo.git (status = 401)

Help is very welcome!


Solution

  • You could try including the password in your url:

    http://jenkins:password@myhost.local/gitblit/git/testing/secured_repo.git