【发布时间】:2014-04-22 10:01:15
【问题描述】:
非常奇怪的行为,我无法理解问题出在哪里。
我在 Github 上有 2 个私有存储库,我使用 Capistrano 进行部署。
第一个应用正常部署deploy.rb:
require "rvm/capistrano"
require 'bundler/capistrano'
set :rvm_ruby_string, "2.1.0"
set :assets_role, :app
set :normalize_asset_timestamps, false
set :application, "awesome_app_one"
set :scm, :git
set :repository, "git@github.com:myaccount/repo_one.git"
set :branch, :master
set :deploy_via, :remote_cache
set :ssh_options, { forward_agent: true }
set :user, "rails"
set :deploy_to, "/home/rails/#{application}"
set :shared_children, %w(public/system public/files public/uploads log tmp/pids tmp/sockets)
set :use_sudo, false
task :production do
role :web, "123.456.789.0"
role :app, "123.456.789.0"
role :db, "123.456.789.0", primary: true
set :branch, :master
set :deploy_to, "/home/rails/#{application}"
set :rails_env, 'production'
end
另一个应用程序有类似的 deploy.rb 配方和 capistrano 找不到 repo:
> ** [123.456.789.0 :: err] ERROR: Repository not found.
> ** [123.456.789.0 :: err] fatal: The remote end hung up unexpectedly
然后我尝试在服务器上克隆 repo:
$> git clone git@github.com:myaccount/repo_two.git
$> Initialized empty Git repository in /home/rails/repo_two/.git/
$> ERROR: Repository not found.
$> fatal: The remote end hung up unexpectedly
我在repo_one 和repo_two 上从服务器添加我的ssh 密钥。看同样的问题here,但没有答案。
更新:
我找到了一些 solution,现在我可以在服务器上克隆 repo,但是有人知道如何告诉 capistrano 使用我的命令来提取 repo?
【问题讨论】:
标签: ruby-on-rails ruby git github capistrano