Question

Very strange behavior and i cant understand where problems. I have 2 private repositories on Github and i deploy with Capistrano. First app normal deployed 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

Another app have similar deploy.rb recipe and capistrano can`t found repo:

> ** [123.456.789.0 :: err] ERROR: Repository not found.
> ** [123.456.789.0 :: err] fatal: The remote end hung up unexpectedly

Then i try clone repo on server:

$> 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

I add my ssh keys from server on repo_one and repo_two. Look the same problem here but no answers.

Update:

I found some solution and now i can clone repo on server but somebody know how tell capistrano use my command to pull repo?

Was it helpful?

Solution

Had this error last night

We had to use this to get around that error:

set :repository, 'https://username:password@github.com/username/repo.git'

We're refactoring, but it worked for us

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top