首次使用Capistrano用戶,我已經設置了最好的部分,但是當我運行cap部署時,我得到以下要求我的github用戶名capistrano部署在git ls-remote call上詢問USERNAME/PASSWORD
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
,系統會提示輸入USERNAME。但是,我可以運行git克隆這個存儲庫好,讓我覺得本地SSH密鑰設置正確。我在這裏錯過了什麼?
THX
編輯#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'內同一網址: https://github.com/nesquena/cap-re cipes/blob/master/examples/simple/deploy.rb#L16 – apneadiving
我這麼認爲 - 我添加了deploy.rb的頂部 - 部署用戶存在於服務器上,但不在本地。在「本地」的印象中,本質上意味着在主機上運行。 – timpone
另外,我可以用遠程主機上的'deploy'用戶克隆git repos 172.230.xxx.xxx – timpone