WebFaction
Community site: login faq

Hello! I'm back!

I had a question about subversion before but have since decided that Git is right for me.

I've run through the entire Git documentation (http://docs.webfaction.com/software/git.html) and have been able to initialize my repository on my account and clone it successfully to my local machine.

However I am unable to push my changes back. I have enabled HTTP push on both my local working copy and the server repository, as well as updated the postBuffer limit to first 500MB and then 1GB, even though I'm only pushing 4.4MGs of changes.

My terminal:

hswolff:The Resistance hswolff$ git push origin master
Password: 
Password: 
error: Cannot access URL http://hswolff@git.domain.com/repos/theresistance.git/, return code 22
fatal: git-http-push failed
hswolff:The Resistance hswolff$

Please help! This is so frustrating!

asked 04 Nov '10, 20:32

hswolff
6125
accept rate: 0%

Hi,

Just to make certain, you are using your domain instead of domain.com correct?

If you put the URL into a browser does it take you to the repo?

(04 Nov '10, 21:11) klynton

Yes, correct. I'm using my domain just didn't want to publish it here.

And yes if I put the url into the browser I see the Gitweb manager.

(04 Nov '10, 21:13) hswolff

OK, I think the problem here may be the URL that is set as the remote "origin". Inside your repo, inside the .git directory there is a config file that you can edit, please check and make sure the URL for your repo is:

http://hswolff@git.domain.com/repos/theresistance.git

instead of:

http://hswolff@git.domain.com/repos/theresistance.git/

UPDATE: What I was trying to do is make sure that the repo URL didn't end in a trailing slash. See the answer by ryans for what the URL should have been.

(04 Nov '10, 21:43) klynton

Just checked the .git/config file in the theresistance repository. It does show the url for my repository without the trailing slash. It's shown as:

http://hswolff@git.domain.com/repos/theresistance.git

Any other suggestions? :\

(05 Nov '10, 09:40) hswolff

Help please!

(05 Nov '10, 10:52) hswolff

Maybe there's a problem with your working copy. If you make a fresh clone of your repo into a new working copy, are you able to push back from that?

(05 Nov '10, 11:10) seanf

Hmm this is interesting. I just did a fresh clone of my repo, and then went to push it without changing it at all and got:

Harry-Wolff:theresistance harry$ git push origin master

Password:

error: src refspec master does not match any.

error: failed to push some refs to 'http://hswolff@git.domain.com/repos/theresistance.git'

Harry-Wolff:theresistance harry$

edit for formatting

(05 Nov '10, 11:21) hswolff

What version of git are you using locally? If you're not using at least v1.6, then try upgrading to a newer version.

(05 Nov '10, 11:33) seanf

Harry-Wolff:~ harry$ git --version git version 1.7.3.1

I also tried rolling back to 1.7.2.2 without success. I don't think I'm doing anything stupid but I could be wrong.

Any ideas what might be going on?

(05 Nov '10, 11:35) hswolff

Can you point in the direction of a tutorial that shows how to initialize a local Git repo and then push it to the server?

I followed the following steps:

$ cd theresistance
$ git init
$ (add some files)
$ git add .
$ git commit -m 'Initial commit'
$ git push http://hswolff@git.domain.com/repos/theresistance master

However I keep getting the following error:

fatal: http://hswolff@git.domain.com/repos/theresistance.git/info/refs not found: did you run git update-server-info on the server?

(05 Nov '10, 14:14) hswolff
showing 5 of 10 show 5 more comments

The problem here is that the remote repository URL is:

http://hswolff@git.domain.com/repos/theresistance.git/

But it should be:

http://hswolff@git.domain.com/theresistance.git

The /repos part is taken care of automatically. (It must be, or else it would also conflict for someone who specifically mounted their 'git' application at a URL path of /repos)

You can list your current remote URLs using:

git remote -v

And can change one using the "git remote set-url" command. For example:

git remote set-url origin 'http://hswolff@git.domain.com/theresistance.git'

Hope that helps!

permanent link

answered 05 Nov '10, 20:25

ryans ♦♦
5.0k93460
accept rate: 43%

Hello Ryan! If you look in the previous block of columns you can see we already attempted to debug this issue you described to no success. Thank you though!

Any other suggestions?

(08 Nov '10, 18:41) hswolff
1

Nowhere in the previous comments are you using this URL:

http://hswolff@git.domain.com/theresistance.git

All of your URLs you have mentioned contain "/repos". Can you confirm that you have tried it without the "/repos" part?

(08 Nov '10, 19:07) ryans ♦♦

You, sir, are a flipping, flying genius. Thank you ever so much, that completely solved all the issues I was experiencing...including all issues ever - from everywhere.

Ok no, but seriously, thank you. I would also like to recommend adding that information to the doc page (http://docs.webfaction.com/software/git.html) because without it the doc information isn't as clear.

Thank you! :D:D just made my night :)

(08 Nov '10, 21:19) hswolff
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×111
×28
×8
×4

question asked: 04 Nov '10, 20:32

question was seen: 15,723 times

last updated: 08 Nov '10, 21:19

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM