Nitrous.io:使用capistrano进行部署导致“错误:未找到存储库”,尽管能够查看远程,推/拉等

时间:2015-01-29 17:17:40

标签: git github deployment capistrano nitrousio

我正在设置Nitrous.io框,不能使用capistrano将我的代码从github部署到登台服务器。远程设置,我已经将nitrous public ssh密钥添加到服务器(我可以从Nitrous终端ssh进入)和我的github帐户,但是当我尝试部署时,我得到:

The deploy has failed with an error: #<SSHKit::Runner::ExecuteError: Exception while executing on host http01-staging.myapp.com: git exit status: 1                                  
git stdout: Nothing written                                                                                                                                                            
git stderr: Error reading response length from authentication socket.                                                                                                                  
ERROR: Repository not found.                                                                                                                                                           
fatal: Could not read from remote repository.                                                                                                                                          

Please make sure you have the correct access rights                                                                                                                                    
and the repository exists.                                                                                                                                                             
error: Could not fetch origin 

存储库当然存在,并且我已经使用这个Nitrous框成功地推动和拉出分支。这里有什么我想念的吗?

2 个答案:

答案 0 :(得分:1)

答案是我必须从Nitrous.io终端运行以下命令:

eval `ssh-agent`
ssh-add

我不知道为什么我能够完成其他操作(ssh到服务器,从/推送到GitHub)而没有这样做。

答案 1 :(得分:0)

您可以使用capistrano-ssh-doctor插件,以及所有类似的capistrano ssh相关问题和疑难解答。

示例问题:ssh无密码登录,本地ssh-agent运行,添加到本地ssh-agent的密钥,ssh-agent转发等。

该插件“分析”您的capistrano配置以及与远程服务器的连接,并为您提供可能出错的“报告”,或只是说明一切正常。

免责声明:我写了这个插件。