我试图让jenkins使用Git作为我们的供应链pipe理,并设置它是有点痛苦。
指定使用Codebase Git repo时,使用以下格式:
https://our.domain.com/repository/repository.git
我从Jenkins得到以下错误:
Failed to connect to repository : Failed to connect to https://our.domain.com/repository/repository.git (status = 401)
该存储库是私人的,我不知道如何configuration一个用户帐户。 我为我的Ubuntu服务器上的Jenkins用户生成了一个RSA SSH密钥,并将其作为部署密钥添加到了Codebase中。
我一直在得到404错误?
另外,如果我尝试了
[email protected]:.../repository.git
格式,我只是从jenkins得到一个不同的错误:
Failed to connect to repository : Command "ls-remote -h [email protected]:.../repository.git HEAD" returned status code 128: stdout: stderr: Host key verification failed. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
我迟到了,但将来这会对其他人有帮助
侮辱了
https://[email protected]/username/repo.git
取代这个
https://bitbucket.org/username/repo.git
在Git仓库URL中
弄清楚了! 您需要到Jenkins / Credentials,在那里添加凭证帐户,然后在添加SCM Git的东西时select这些凭证。