Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
TeamCity和Mercurial在Linux上通过SSH_Linux_Ubuntu_Mercurial_Ssh_Teamcity - Fatal编程技术网

TeamCity和Mercurial在Linux上通过SSH

TeamCity和Mercurial在Linux上通过SSH,linux,ubuntu,mercurial,ssh,teamcity,Linux,Ubuntu,Mercurial,Ssh,Teamcity,我正在努力让我们的Ubuntu TeamCity服务器通过SSH签出repos。基本上我的问题是,我应该在哪里指定私钥密码 在托管teamcity的机器上运行shell并作为teamcity运行的用户登录时,我可以运行hg clonessh://hg@localhost/test克隆存储库“test”。但是我必须输入用户的私钥密码 我的TeamCity项目设置为: 从:hg clone获取更改ssh://hg@本地主机/测试 密码:(私钥密码) 单击“测试连接”将导致 Test connec

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

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

我的TeamCity项目设置为:

  • 从:hg clone获取更改ssh://hg@本地主机/测试
  • 密码:(私钥密码)
单击“测试连接”将导致

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!

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

是的,工作正常!谢谢PS:我认为这是相关的: