I'm trying to figure out why I'm getting an error from my remote git repository when I try to deploy my rails app. It's telling me that it's not a git repository, yet I can push and pull from it without issue. However I recently had issues with git not being found by bash, but it was simply a path variable issue that cropped up when I installed macports (I think). It's now fixed. Thanks in advance for any help you might be able to provide! The error output is below:
my-MacBook-Pro:project myUser$ cap deploy:update * executing `deploy:update' ** transaction: start * executing `deploy:update_code' updating the cached checkout on all servers executing locally: "git ls-remote firstname.lastname@example.org/usr/local/git_root/project.git master" fatal: 'email@example.com/usr/local/git_root/project.git' does not appear to be a git repository fatal: The remote end hung up unexpectedly *** [deploy:update_code] rolling back * executing "rm -rf /usr/local/www/sites/project.example.ca/releases/20120403193900; true" servers: ["project.example.ca"] [project.example.ca] executing command [project.example.ca] rvm_path=/usr/local/rvm /usr/local/rvm/bin/rvm-shell 'ruby-1.9.2-p290@project' -c 'rm -rf /usr/local/www/sites/project.example.ca/releases/20120403193900; true' command finished in 639ms Command git ls-remote firstname.lastname@example.org/usr/local/git_root/project.git master returned status code pid 1815 exit 128
Turns out the problem was that the repository address WAS malformed as the user above suggested. However, the problem was resolved by adding an 'ssh:' prefix to the repository address. Thanks for the suggestions!
Looks like you've got a malformed Git URL:
git ls-remote email@example.com/usr/local/git_root/project.git master
git ls-remote firstname.lastname@example.org:/usr/local/git_root/project.git master
They follow SCP protocol (see the git-clone manpage for more).
Your key must be available to ssh-agent
I had same problem. Solved with "ssh-add yourkey" , where yourkey is the path do id_rsa, and you can check with: ssh-add -L, if ok will return your public key