Reputation: 19969
First time Capistrano user, I have set up the pieces from the best I can tell but when I run cap deploy, I get the following asking for my github username
Fri Dec 02$ cap deploy
* executing `deploy'
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
executing locally: "git ls-remote https://github.com/uname/repo HEAD"
Username:
I'm assuming that this running locally on my OS X laptop. If I run git ls-remote https://github.com/uname/repo
, I get prompted for a USERNAME. However, I can run git clone this repository fine, making me think that the local ssh keys are set up correctly. What am I missing here?
thx
edit #1 - top of deploy.rb
set :application, "test-rails"
set :repository, "https://github.com/uname/app"
set :scm, :git
set :user, "deploy"
set :deploy_to, "/data/sites/site.com/apps/#{application}"
set :use_sudo, false
set :keep_releases, 5
role :web, "173.230.xxx.xxx"
Upvotes: 3
Views: 3744
Reputation: 185
perhaps it will help to others: on target server make sure credentials for cached repo. t cached my first NON password url and no matter how i update url in deploy.rb it was not updated on origin
in my case...
go to: /srv/YOURREPONAME/shared/cached-copy
git remote show origin
make sure your origin has same URL as you trying to set in deploy.rb
Upvotes: 0
Reputation: 78703
You're using an HTTPS URL. This will ignore your SSH keys, and you'll have to do basic authentication over HTTPS. You want your URL to instead be ssh://[email protected]/uname/repo
.
(Cloning works because you can clone anonymously and don't need to authenticate.)
Upvotes: 6