sixty4bit
sixty4bit

Reputation: 7956

Nitrous.io: Deploying with capistrano results in "ERROR: Repository not found" despite being able to view remote, push/pull, etc

I am setting up a Nitrous.io box and can't use capistrano to deploy my code from github to the staging server. The remote is set up and I've added the nitrous public ssh key to the server (I can ssh in from the Nitrous terminal) and to my github account, but when I try to deploy I get:

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 

The repository certainly exists, and I've already successfully pushed and pulled branches to/from it with this Nitrous box. Is there something I'm missing here?

Upvotes: 0

Views: 683

Answers (2)

user777337
user777337

Reputation:

You can use capistrano-ssh-doctor plugin for this, and all similar capistrano ssh related issues and troubleshooting.

Example issues: ssh passwordless login, local ssh-agent running, keys added to local ssh-agent, ssh-agent forwarding etc.

The plugin "analyzes" your capistrano config as well as a connection to the remote server and gives you the "report" of what might be wrong, or just states all is ok.

Disclaimer: I wrote the plugin.

Upvotes: 0

sixty4bit
sixty4bit

Reputation: 7956

The answer was that I had to run the following commands from the Nitrous.io terminal:

eval `ssh-agent`
ssh-add

Not sure why I was able to complete the other actions (ssh into server, pull from/push to GitHub) without having done this.

Upvotes: 1

Related Questions