【问题标题】:TeamCity and Mercurial via SSH on LinuxTeamCity 和 Mercurial 在 Linux 上通过 SSH
【发布时间】:2012-10-26 15:29:34
【问题描述】:

我正在努力让我们的 Ubuntu TeamCity 服务器通过 SSH 签出 repos。基本上我的问题是,我将在哪里指定私钥密码?

在托管 teamcity 的机器上运行 shell 并以运行 teamcity 的用户身份登录时,我可以运行 hg clone ssh://hg@localhost/test 来克隆存储库“test”。但我必须输入用户的私钥密码。

我的 TeamCity 项目设置为:

  • 从以下位置拉取更改:hg clone ssh://hg@localhost/test
  • 密码:(私钥密码)

点击“测试连接”结果

Test connection failed in Test :: Test 42. '/usr/bin/hg identify ssh://hg@localhost/test' command failed.
stdout: remote: Permission denied, please try again.
remote: Permission denied, please try again.
remote: Permission denied (publickey,password).

stderr: abort: no suitable response from remote hg!

【问题讨论】:

    标签: linux ubuntu mercurial ssh teamcity


    【解决方案1】:

    如果密钥对仅用于 TeamCity 服务器与 Mercurial 存储库的交互,这是最简单且仍然安全的解决方案,前提是您使用限制性保护私钥文件足够的访问权限(即,TeamCity 服务器运行的用户的只读权限)是从私钥中删除密码。具有空密码短语的私钥将不再​​提示输入密码短语,因此不需要用户交互,从而实现自动化解决方案。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-05-24
    • 1970-01-01
    • 2016-06-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多