Jenkins 访问 bitbucket.org 上的 Mercurial 存储库时出现问题
我的 Jenkins 服务器已停止能够构建托管在 bitbucket.org 上的 Maven 项目。构建在本地工作,但 Jenkins 报告此错误:
[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传入
后
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 可以成功构建了。
My Jenkins server has stopped being able to build a maven project hosted at bitbucket.org. The build works locally but Jenkins reports this error:
[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}
Any ideas what's going on?
[edit]
So, I ran hg paths
and got a response that the tomcat user was untrusted:
Not trusting file /usr/local/tomcat/.jenkins/jobs/Test/workspace/.hg/hgrc from untrusted user tomcat, group tomcat
After running hg incoming
as the tomcat user
cd /usr/local/tomcat/.jenkins/jobs/Test/workspace
sudo -u tomcat hg incoming
I got an error saying the permissions on my ssh key were too open:
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!
and thanks to this SO question
I set the permissions and now Jenkins can successfully build.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于您的
hg 传入
是基于存储库的hgrc
中的“默认”路径(使用hg paths
查看它们,或打开文件),也许您应该确保远程存储库的地址仍然正确并且该项目仍然可以访问。Since your
hg incoming
is based on whatever your 'default' path is in the repository'shgrc
(usehg paths
to see them, or open the file), maybe you should make sure the address of the remote repository is still correct and that the project is still accessible.