tim*_*one 3 git capistrano ruby-on-rails github ruby-on-rails-3
第一次使用Capistrano用户,我已经设置了最好的部分,但是当我运行cap deploy时,我得到以下要求我的github用户名
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:
Run Code Online (Sandbox Code Playgroud)
我假设这在我的OS X笔记本电脑上本地运行.如果我跑git ls-remote https://github.com/uname/repo,我会收到提示您输入USERNAME.但是,我可以运行git clone这个存储库,让我觉得本地ssh密钥设置正确.我在这里错过了什么?
谢谢
编辑#1 - 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"
Run Code Online (Sandbox Code Playgroud)
您正在使用HTTPS网址.这将忽略您的SSH密钥,您将不得不通过HTTPS进行基本身份验证.您希望改为使用您的网址ssh://git@github.com/uname/repo.
(克隆有效,因为您可以匿名克隆,不需要进行身份验证.)