【发布时间】:2011-12-02 19:31:30
【问题描述】:
第一次 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:
我假设它在我的 OS X 笔记本电脑上本地运行。如果我运行git ls-remote https://github.com/uname/repo,系统会提示我输入用户名。但是,我可以很好地运行 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"
【问题讨论】:
-
你在
deploy.rb里面设置你的用户名像这里:github.com/nesquena/cap-recipes/blob/master/examples/simple/… -
我想是这样 - 我添加了 deploy.rb 的顶部 - 部署用户存在于服务器上但不在本地。给人的印象是,“本地”基本上意味着在运行它的主机上。
-
另外,我可以使用远程主机 172.230.xxx.xxx 上的
deploy用户克隆 git 存储库
标签: ruby-on-rails ruby-on-rails-3 git github capistrano