通过Codeship在远程服务器上部署时,SSH会提示输入密码

时间:2018-04-12 12:34:20

标签: git ssh deployment codeship

我正在努力通过Codeship通过SSH与我的服务器连接。我跟着他们的文档,但我无法让它工作。

到目前为止,我已经完成了所有步骤,但仍然没有运气。

Codeship Project SSH公钥 - 已添加到我的服务器 authorized_keys 文件

https://documentation.codeship.com/general/projects/project-ssh-key/

通过SSH公钥进行身份验证 - 使用chmod -R go-rwx ~/.ssh/

更改了ssh文件夹的权限

https://documentation.codeship.com/basic/continuous-deployment/deployment-with-ftp-sftp-scp/#authenticating-via-ssh-public-keys

我也发现其他人有一些问题:

https://community.codeship.com/t/what-is-password-for-ssh-access/995/6

......我跟着它但仍然没有运气。我跑了:

cat ~/.ssh/id_rsa.pub  

...获取我的服务器公钥并将其添加到我在Codeship中的个人帐户设置。

最后,我将此测试命令添加到项目的部署部分的自定义脚本中。

ssh user@domain.com 'mkdir test_folder'

因此,在使用git push进行构建之后,这就是我得到的内容,即使用密码输入提示脚本:

Warning: Permanently added 'domain.com,XXX.XXX.XXX.XXX' (RSA) to the list of known hosts.
user@domain.com's password:

知道可能是什么问题,或者我错过了什么?

谢谢!

0 个答案:

没有答案
相关问题