问题描述
当我指定Repo URL时,jenkins会返回以下错误消息:
使用HTTPS时: // url:jenkins返回:
我可以在jenkins运行的同一台机器上成功克隆repo,并且还运行 git ls-remote -h git @ github .com:adolfosrs / jenkins-test.git HEAD
命令。所以我在github上有了正确的SSH。
问题在于,我用root用户创建了ssh文件。
所以文件所有者是root。
解决方案只是将所有权更改为jenkins用户。
chown jenkins id_rsa.pub
chown jenkins id_rsa
I'm trying to connect jenkins on a github repo.
When I specify the Repo URL jenkins return the following error message:
When using the HTTPS:// Url jenkins returns:
I could successfully clone the repo at the same machine where jenkins is running and I also run the git ls-remote -h [email protected]:adolfosrs/jenkins-test.git HEAD
command. So I have the right SSH at github.
The problem was that somehow I created the ssh files with the root user.So the files owner was root.
The solution was just change the ownership to the jenkins user.
chown jenkins id_rsa.pub
chown jenkins id_rsa
这篇关于Jenkins:无法连接到存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!