Aur*_*ger 0 ruby git ssh ruby-on-rails github
这是我第一次使用linode并将Rails应用程序上传到VPS,所以我可能会跳过一些明显的东西.
我按照两个教程 Ryan Bates视频部署到vps 和 David在Stackoverflow上的答案
我想要在Linode上部署我的rails应用程序(Ubuntu 13.10)
当我执行命令 bundle exec cap deploy:update
由于公钥,我得到了Linode无法连接到github的错误
user:my-app User$ bundle exec cap deploy:update
  * 2014-02-12 17:19:46 executing `deploy:update'
 ** transaction: start
  * 2014-02-12 17:19:46 executing `deploy:update_code'
    updating the cached checkout on all servers
    executing locally: "git ls-remote git@github.com:user/my-app.git master"
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
*** [deploy:update_code] rolling back
  * executing "rm -rf /home/user/apps/my-app/releases/20140212091953; true"
    servers: ["XXX.XXX.XX.XX"]
    [XXX.XXX.XX.XX] executing command
    command finished in 4607ms
Command git ls-remote git@github.com:user/my-app.git master returned status code pid 1529 exit 128
在我的本地机器上,我没有问题提交并在Github上推送我的应用程序,我在本地计算机上有RSA密钥.它只是要求我每次推送我的应用程序时使用我的用户名和密码登录.
在shell的linode上,我可以通过使用连接到github ssh -vT git@github.com.我在linode服务器上有RSA密钥,我使用了ssh-agentssh-add
我的deploy.rb
set :application, "my-app"
set :user, "user"
set :deploy_to, "/home/#{user}/apps/#{application}"
set :deploy_via, :remote_cache
set :use_sudo, false
set :keep_releases, 3
default_run_options[:pty] = true
set :scm, :git
set :repository, "git@github.com:user/#{application}.git"
set :ssh_options, { :forward_agent => true }
# ssh_options[:forward_agent] = true
set :branch, "master"
我有点不知所措.
编辑:我有一个私人存储库
我刚从Linux迁移到Mac OSx.因此,我已将整个.ssh文件夹从linux 导入到mac.虽然从Linux迁移到linux但它有效,但为了使它在Mac上运行,我还要运行:
ssh-add
这是整个修复;)有关详细信息,请参阅http://peteoliveira.com/deploying-with-capistrano-3-failing-permission-denied-publickey/.
| 归档时间: | 
 | 
| 查看次数: | 1596 次 | 
| 最近记录: |