문제

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!

도움이 되었습니까?

해결책

You could try including the password in your url:

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

다른 팁

This should work using Jenkins 1.560 and gitblit 1.5.0 if you add the credentials to Jenkins(Global Credentials) and use JGit(if the installed version of git doesn't support git config --local) You can probably use native git if you have a more recent version(>=1.7.9).

Url would be http://myhost.local/gitblit/git/testing/secured_repo.git

Then either select credentials from the dropdown or add new credentials.

Use .netrc in folder /var/lib/jenkins

machine host
login user
password yourpassword
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top