$ bundle exec cap production deploy
SSHKit ::亚军:: ExecuteError
(Backtrace restricted to imported tasks) cap aborted!
SSHKit::Runner::ExecuteError:
Exception while executing as [email protected]: git exit status: 128 git stdout: Nothing written git stderr: Permission denied (publickey).
fatal: The remote end hung up unexpectedlySSHKit::Command::Failed:
git exit status: 128
git stdout:Nothing written
git stderr: Permission denied (publickey).
fatal: The remote end hung up unexpectedly
Tasks: TOP => git:check (See full trace by running task with --trace) The deploy has failed with an error:
Exception while executing as [email protected]:
git exit status: 128 git stdout: Nothing written
git stderr: Permission denied (publickey).
fatal: The remote end hung up unexpectedly
*
deploy.rb
set :application, 'Psara'
set :repo_url, '[email protected]:CBLaughter/psara.git'
set :deploy_to, '/home/Psara/Psara'
set :default_run_options, :pty => truenamespace :deploy do
after :restart, :clear_cache do on roles(:web), in: :groups, limit: 3, wait: 10 do # Here we can do anything such as: # within release_path do # execute :rake, 'cache:clear' # end end end
end
set :ssh_options, { forward_agent: true, paranoid: true, keys: "~/.ssh/id_rsa" }
*
production.rb
set :stage, :staging
set :rails_env, :productionrole :app, %w{sakura}
role :web, %w{sakura}
role :db, %w{sakura}server 'sakura', user: 'Psara', roles: %w{web app}, my_property: >:my_value
set :ssh_options, {
keys: %w(~/.ssh/id_rsa),
forward_agent: false, }
如果你能教我如何解决这个问题,我会很高兴。
我已经在bitbucket上添加了一个公钥,但它不起作用。
*
SSH代理转发报告
[success]
repo_url
setting ok[success] ssh private key file exists
[success]
ssh-agent
process seems to be running locally[success]
ssh-agent
process recognized byssh-add
command[success] ssh private keys added to
ssh-agent
[success] application repository accessible from local machine
[success] all hosts using passwordless login
[success]
forward_agent
ok for all hosts[success] ssh agent successfully forwarded to remote hosts
[success] application repository accessible from remote hosts
It seems SSH agent forwarding is set up correctly! You can continue with the deployment process.
It succeeded in all tests, but still makes same error.
请编辑您的问题以使用代码块,以便我们可以阅读它。还要清楚地说明你的错误是什么。 – 2015-02-07 00:07:48
@Shion Yamaguchi:你如何解决你的问题,因为我也卡住了!和你在同一页上? – VKatz 2016-03-30 08:17:57