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

  • SEARCH
  • Home
  • 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 517335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:49:24+00:00 2026-05-13T07:49:24+00:00

I searched all of the relevant Capistrano issues, but couldn’t find something that even

  • 0

I searched all of the relevant Capistrano issues, but couldn’t find something that even elucidated anything here for me.

git version 1.6.4.2
Capistrano v2.5.10

Basically, when I run my cap deploy.rb script, it connects to the server, starts executing the deploy:update task, then in the deploy:update_code task:

    *** [deploy:update_code] rolling back
  * executing "rm -rf /home/user_name/public_html/project_name/releases/20091223094358; true"
    servers: ["project_name.com"]

It fails with the following error:

/Library/Ruby/Gems/1.8/gems/capistrano-2.5.10/lib/capistrano/recipes/deploy/scm/git.rb:231:in `query_revision': Unable to resolve revision for 'master' on repository 'ssh://git@slice_ip:path_to_git_repository'. (RuntimeError)

Here’s my deploy script, I’ve tried including and omitting:

set :branch ‘master’

I also just thought my path to the repository was off, but i’ve tried just about every permutation (absolute, not absolute, .git suffix, no suffix). There’s definitely a bare git repository at the path i’m pointing to.

**I do have multiple projects being hosted on one slice. The other projects is also a rails project, but is running SVN. Capistrano deployments work fine.

Any pointers in the right direction or any ideas would help reduce the amount of drinking I am planning on doing if I can’t figure this out. (Paths / IPs obfuscated, dont hack me bro!)

set :application, "project1"
set :user, "username"
set :repository,  "ssh://git@67.24.9.133/home/git/project1.git"
set :branch, "master" 

set :port, 696969

set :deploy_to, "/home/username/public_html/#{application}"

set :scm, :git

role :app, application                    
role :web, application                    
role :db,  application, :primary => true 

# deployment via remote client (workstation)
set :deploy_via, :copy 
set :runner, user

# mod_rails
namespace :deploy do
  desc "Restarting mod_rails with restart.txt"
  task :restart, :roles => :app, :except => { :no_release => true } do
    run "touch #{current_path}/tmp/restart.txt"
  end

  [:start, :stop].each do |t|
    desc "#{t} task is a no-op with mod_rails"
    task t, :roles => :app do ; end
  end
end

This was the most relevant post (extremely relevant even), but I couldn’t really figure out what they were saying the fix is. I’m pretty new with git / capistrano configs.

https://capistrano.lighthouseapp.com/projects/8716/tickets/56-query_revision-unable-to-resolve-revision-for-head-on-repository

  • 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-13T07:49:25+00:00Added an answer on May 13, 2026 at 7:49 am

    Ok I seemed to have fixed it.

    Basically, since I have 2 separate repositories on the remote server, I think the “git” user was failing because I hadn’t registered an ssh keypair for the git user. That explains why one of my deploy.rb scripts was working properly, while this one wasn’t.

    In the link I posted in the question, one of the commenters pointed out the issue:

    https://capistrano.lighthouseapp.com/projects/8716/tickets/56-query%5Frevision-unable-to-resolve-revision-for-head-on-repository

    Note this error is also displayed if
    you are using multiple github keys per
    http://capistrano.lighthouseapp….
    and you do not have these keys and a
    corresponding entry in your
    .ssh/config on the workstation you’re
    running the deploy from. so the
    ls-remote is run locally. is there a
    way to reference the repository at
    github.com for this request while the
    remote deploy uses
    git@github-project1:user/project1.git

    Also, see the following link for more details, since the whole ssh issue would apply even if you’re not using github.

    http://github.com/guides/multiple-github-accounts

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

Sidebar

Related Questions

there. I've searched my question around here but failed to find anything relevant. This
I searched a lot and couldn't find anything relevant... I am working on iOS
I've searched all over for an answer to this, but cannot find any clear
I've searched all over the web and can't seem to find documentation or even
I've searched all over and couldn't find an answer to this seemingly common question,
I have read the documentation and searched all over but I can't find how
(honestly I searched and read all the 'related questions' that seemed relevant - i
I've searched for a solution for my problem all over but I cannot find
I searched all day for the right answer on stackoverflow, also I couldn't find
I've searched here a bit but could not find an answer to my issue.

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.