Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6824371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:53:36+00:00 2026-05-26T21:53:36+00:00

Recently, a project I’m working on changed source repositories on Github. The deploy.rb was

  • 0

Recently, a project I’m working on changed source repositories on Github.

The deploy.rb was updated to correctly point to the new github account, but when I run the cap staging deploy, it looks for the old repo.

cap staging deploy
      * executing `staging'
      * executing `deploy'
      * executing `deploy:updatify'
      * executing "cd /home/deploy/example/current; git fetch origin; git reset --hard origin/staging"
        servers: ["example.com"]
        Password: 
        [example.com] executing command
     ** [out :: example.com] ERROR: oldusername/example.git doesn't exist. Did you enter it correctly?
     ** [out :: example.com] fatal: The remote end hung up unexpectedly
     ** [out :: example.com] HEAD is now at 7c92a69 adding changes
        command finished in 4148ms
        triggering after callbacks for `deploy:updatify'
      * executing `bundle:install'
      * executing "cd /home/deploy/example/current && bundle install --gemfile /home/deploy/example/current/Gemfile --path /home/deploy/example/shared/bundle --deployment --quiet --without development test"
        servers: ["example.com"]
        [example.com] executing command
        command finished in 7442ms
      * executing `deploy:restart'
      * executing "cd /home/deploy/example/current; [ -f tmp/pids/unicorn.pid ] && kill -USR2 `cat tmp/pids/unicorn.pid` || bundle exec unicorn_rails -c ./config/unicorn.rb -E staging -D"
        servers: ["example.com"]
        [example.com] executing command
        command finished in 94ms

I tried to look for a cached-copy directory as mentioned here: Capistrano still trying to connect to my old repo but on my server, there is no cached-copy directory.

Where is it still referencing the old repository?

deploy.rb:

 require 'bundler/capistrano'

 load 'config/deploy/nginx'
 load 'config/deploy/unicorn'
 load 'config/deploy/updatify'

 # Base Settings ############################################################

 set :user,          'deploy'
 set :application,   'example'
 set :use_sudo,      false
 set :scm,           :git
 set :repository,    'git@github.com:new_repo_user/example.git'
 set :deploy_to,     "/home/#{user}/#{application}"

 # Fake using releases to just use git
 set :current_release, current_path

 ssh_options[:paranoid] = false
 default_run_options[:pty] = true

 # Multistage ###############################################################    ###

 task :production do
   server 'exampleprod.com', :app, :web, :db, :primary => true
   set  :branch,      'origin/production'
   set  :environment, 'production'
   set  :environment_database, defer { production_database }
   set  :environment_dbhost,   defer { production_dbhost }
 end

 task :staging do
   server 'example.com', :app, :web, :db, :primary => true
   set :branch,      'origin/staging'
   set :environment, 'staging'
   set :environment_database, defer { environment_info["database"] }
   set :environment_dbhost,   defer { environment_info["host"] }
 end
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T21:53:37+00:00Added an answer on May 26, 2026 at 9:53 pm

    It turns out there was still a reference to the original repository in the .git/config file.

    I changed this:

    [remote "origin"]
            fetch = +refs/heads/*:refs/remotes/origin/*
            url = git@github.com:oldusername/example.git
    

    To this:

    [remote "origin"]
            fetch = +refs/heads/*:refs/remotes/origin/*
            url = git@github.com:new_repo_user/example.git
    

    And Capistrano started doing the right thing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So working on a project recently (by myself - no other developers), I somehow
I've starting using Codeigniter for a project recently (few months ago) but its getting
Recently in a project I am working on, I needed to store callbacks in
i recently finished one project..now when i create a new navigation project in xcode
I'm fairly new to MVVM, and I have recently started a project cleaning up
I recently added a new project to my Visual Studio 2008 solution. Now, as
I've been working on an embedded C/C++ project recently using the shell in Tornado
I'm new to RoR and started making a project recently. The project has public/stylesheets
I have been working on a project recently where a Player can create a
So recently on a project I'm working on, we've been struggling to keep a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.