我正在尝试在Dreamhost上设置我的Rails应用程序,并且我正处于尝试设置Capistrano的阶段。
我在部署位置所在的服务器上安装了git服务器。我已经设置了我的SSH密钥(我想) --至少我可以毫无问题地使用SSH。
'cap deploy:setup‘和'cap deploy:check’运行时都没有错误。
但是,当我尝试运行'cap deploy:migrations‘时,我得到了以下结果:
* executing `deploy:migrations'
* executing `deploy:update_code'
updating the cached checkout on all servers
executing locally: "git ls-remote user@server.dreamhost.com:git/project.git master"
command finished in 1065ms
* executing "if [ -d /home/user/domain.com/shared/cached-copy ]; then cd /home/user/domain.com/shared/cached-copy && git fetch origin && git fetch --tags origin && git reset --hard 406475489f2934554f5b80cf17e44576ba7ee02f && git clean -d -x -f; else git clone user@domain.dreamhost.com:git/project.git /home/user/domain.com/shared/cached-copy && cd /home/user/domain.com/shared/cached-copy && git checkout -b deploy 406475489f2934554f5b80cf17e44576ba7ee02f; fi"
servers: ["server.dreamhost.com"]
[server.dreamhost.com] executing command
** [server.dreamhost.com :: out] Cloning into /home/user/domain.com/shared/cached-copy...这就是问题所在:
** [server.dreamhost.com :: err] Host key verification failed.
** [server.dreamhost.com :: err] fatal: The remote end hung up unexpectedly
command finished in 157ms
failed: "sh -c 'if [ -d /home/user/domain.com/shared/cached-copy ]; then cd /home/user/domain.com/shared/cached-copy && git fetch origin && git fetch --tags origin && git reset --hard 406475489f2934554f5b80cf17e44576ba7ee02f && git clean -d -x -f; else git clone user@server.dreamhost.com:git/project.git /home/user/domain.com/shared/cached-copy && cd /home/user/domain.com/shared我已经擦除了我的密钥并创建了新的密钥(同样,通过SSH连接到服务器上也没什么用)。这可能是我的一个非常基本的误解,但我不能弄清楚。
发布于 2012-03-01 15:05:02
请删除dreamhost服务器上的/home/user/.ssh/known_hosts,然后重试。当从user@server.dreamhost.com:git/project.git克隆时,服务器正在访问自身。
如果这个服务器的IP改变了,你就会遇到那样的问题。
发布于 2012-03-14 21:26:07
我有一个相同的设置&在部署的同一时间点遇到了阻碍。为了完成调查,我将添加以下详细信息:
在dreamhost服务器上(主目录/用户/.ssh/):authorized_keys和id_rsa。
ssh user@server.dreamhost.com = no problem, but I was asked to verify key authenticity.
cap deploy:setup = no problems.
cap deploy:check = no problems.
cap deploy:migrations = failure (host key verification.)发布于 2013-09-05 23:39:07
1) SSH进入Dreamhost
2) > ssh bitbucket.org
您将看到类似如下的内容:
The authenticity of host 'bitbucket.org (131.103.20.168)' can't be established.
RSA key fingerprint is 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40.
Are you sure you want to continue connecting (yes/no)?3)输入"yes“
Warning: Permanently added 'bitbucket.org,131.103.20.168' (RSA) to the list of known hosts.现在,bitbucket.org已正确添加到.known_hosts中。
https://stackoverflow.com/questions/9509966
复制相似问题