What does this git error mean?

Asked

Viewed 135 times

3

I’m migrating a git repository from the server. I’m taking it out of my VPS and moving it to Bitbucket.

I took all the VPS branches and successfully climbed to the mentioned service. I even added a deployment key so that the staging server can update the source code there. Nothing wrong has happened and I can already work quietly. The problem happens at the time of implantation.

My file on Pistrano is like this:

set :deploy_to, "/var/www/apps/#{fetch(:application)}"
set :branch, 'upgrade_infra'
set :rails_env, 'production'

When I give one

cap application deploy 

I have this return the moment Capistrano tries to pull ( or whatever he does to recover the source code ):

Sshkit::Runner::Executeerror: Exception while executing as [email protected]: git Exit status: 2
git stdout: fatal: Not a Valid Object name
tar: This does not look like a tar Archive
tar: Exiting with Failure status due to Previous errors
git stderr: Nothing Written

What’s driving me crazy is this "not a Valid Object name". It’s okay in the repository. All branches there ( including this ). All perfectly synchronized with my local environment.

The strange thing is that if I change the name of the branch in Pistrano to master, works perfectly.

I searched a lot and everything indicates that the problem is because the branch does not exist on the remote server or does not have any commit, which is not my case, since I went up there branches very old, with thousands of commits.

Would someone please help me?

  • Are you sure you have a name branch upgrade_infra?

  • Yes @Math, absolute sure :/

  • How the line of this branch appears upgrade_infra at the exit of the command git branch -a?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.