繁体   English   中英

Jenkins访问bitbucket.org上的Mercurial存储库的问题

[英]Problem with Jenkins accessing Mercurial repository on bitbucket.org

我的Jenkins服务器已停止构建在bitbucket.org上托管的Maven项目。 构建在本地工作,但詹金斯报告此错误:

[workspace] $ hg incoming --quiet --bundle hg.bundle --template "<changeset node='{node}' author='{author|xmlescape}' rev='{rev}' date='{date}'><msg>{desc|xmlescape}</msg><added>{file_adds|stringify|xmlescape}</added><deleted>{file_dels|stringify|xmlescape}</deleted><files>{files|stringify|xmlescape}</files><parents>{parents}</parents></changeset>\n" --rev default
abort: no suitable response from remote hg!
ERROR: Failed to determine incoming changes
[workspace] $ hg log --rev . --template {node}

有什么想法吗?

[编辑]

因此,我运行了hg paths并得到了响应,表明tomcat用户不受信任:

Not trusting file /usr/local/tomcat/.jenkins/jobs/Test/workspace/.hg/hgrc from untrusted user tomcat, group tomcat

在以tomcat用户身份运行hg incoming

cd /usr/local/tomcat/.jenkins/jobs/Test/workspace
sudo -u tomcat hg incoming 

我收到一个错误消息,说我的ssh密钥权限太开放:

remote: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
remote: @         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
remote: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
remote: Permissions 0620 for '/usr/local/tomcat/.ssh/id_rsa' are too open.
remote: It is recommended that your private key files are NOT accessible by others.
remote: This private key will be ignored.
remote: bad permissions: ignore key: /usr/local/tomcat/.ssh/id_rsa
remote: Permission denied (publickey).
abort: no suitable response from remote hg!

并感谢这个问题

我设置了权限,现在Jenkins可以成功构建了。

由于您的hg incoming基于存储库hgrc中的“默认”路径(使用hg paths查看它们,或打开文件),因此您可能应该确保远程存储库的地址仍然正确并且该项目仍然可以访问。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM