I have a Capistrano script that deploys some rails code to a ubuntu box. My git repo is not on github but rather on our companies server. I have configured capistrano like so...
set :repository, "ssh://non-root-user@mydomain.com/opt/git/hub/app.git"
When I deploy using the copy feature...
set :deploy_via, :copy
It works without issue. But when I deploy using a remote cache...
set :deploy_via, :remote_cache
It fails with the error message
Permission denied, please try again.←[0m
Permission denied, please try again.←[0m
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).←[0m
fatal: The remote end hung up unexpectedly
This is during the deploy:update_code
task. My guesses are this error is showing up for possibly the following reasons?
1 - Maybe I need to setup some keys? My git repo server is different than the target deployment server, but both are hosted by my company. Suggestions appreciated.
Edit: I tried ssh_options[:forward_agent] = true default_run_options[:pty] = true and it would prompt me for a password, I would enter the correct password but it would say permission denied anyways. I am no longer deploying as root.