Ssh Capifony部署不能“部署”;“git克隆”;
我无法通过Capistrano v2.8.0上非常新的capifony进行部署-这是我第一次部署Capistrano/capifony 我已经成功地完成了cap-deploy:setup,现在我需要执行cap-deploy:cold。 SSH通信工作正常,但由于SSH权限,无法执行git clone命令:Ssh Capifony部署不能“部署”;“git克隆”;,ssh,capistrano,ssh-keys,Ssh,Capistrano,Ssh Keys,我无法通过Capistrano v2.8.0上非常新的capifony进行部署-这是我第一次部署Capistrano/capifony 我已经成功地完成了cap-deploy:setup,现在我需要执行cap-deploy:cold。 SSH通信工作正常,但由于SSH权限,无法执行git clone命令: * executing "git clone -q git@github.com:palmic/www.myproject.com.git /home/palmic/web/hostik.
* executing "git clone -q git@github.com:palmic/www.myproject.com.git /home/palmic/web/hostik.cz/palmic/releases/20110823122821 && cd /home/palmic/web/hostik.cz/palmic/releases/20110823122821 && git checkout -q -b deploy 7407672c0a59ad631ea2f1f1d71fb15c2f68ac30 && (echo 7407672c0a59ad631ea2f1f1d71fb15c2f68ac30 > /home/palmic/web/hostik.cz/palmic/releases/20110823122821/REVISION)"
servers: ["hostik.cz"]
[hostik.cz] executing command
** [hostik.cz :: err] Permission denied (publickey).
** fatal: The remote end hung up unexpectedly
command finished in 3123ms
*** [deploy:update_code] rolling back
* executing "rm -rf /home/palmic/web/hostik.cz/palmic/releases/20110823122821; true"
servers: ["hostik.cz"]
[hostik.cz] executing command
command finished in 164ms
当我登录到ssh会话并手动调用它时,它会请求ssh密码。
当我在deploy.rb中填写我喜欢的相同密码短语:scm_密码短语时,克隆就成功完成了。
所以看起来capistrano无法在我的设置中填充密码短语
顺便说一句,ssh_options[:forward_agent]=true/false完全没有任何人知道原因???(我的~/.ssh/config中允许代理转发):
my deploy.rb:
set :application, "app"
set :domain, "hostname"
set :deploy_to, "remotepath"
set :use_sudo, false
set :repository, "git@github.com:palmic/myproject.git"
set :scm, :git
set :user, "my remote username"
set :scm_passphrase, "my ssh passphrase on remote host"
set :branch, "git project deploy branchname"
set :scm_verbose, true
role :web, domain # Your HTTP server, Apache/etc
role :app, domain # This may be the same as your `Web` server
role :db, domain, :primary => true # This is where Rails migrations will run
set :keep_releases, 3
ssh_options[:forward_agent] = true
default_run_options[:pty] = true
我知道这不是任何原始错误,我遗漏了一些东西,有人知道吗?您可以将此添加到部署中。rb:
set :application, "app"
set :domain, "hostname"
set :deploy_to, "remotepath"
set :use_sudo, false
set :repository, "git@github.com:palmic/myproject.git"
set :scm, :git
set :user, "my remote username"
set :scm_passphrase, "my ssh passphrase on remote host"
set :branch, "git project deploy branchname"
set :scm_verbose, true
role :web, domain # Your HTTP server, Apache/etc
role :app, domain # This may be the same as your `Web` server
role :db, domain, :primary => true # This is where Rails migrations will run
set :keep_releases, 3
ssh_options[:forward_agent] = true
default_run_options[:pty] = true