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

发布于 2024-11-15 18:04:55 字数 1858 浏览 2 评论 0原文

我的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

温柔戏命师 2024-11-22 18:04:55

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

Since your hg incoming is based on whatever your 'default' path is in the repository's hgrc (use hg 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文