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:
Please help! This is so frustrating! asked 04 Nov '10, 20:32 hswolff
showing 5 of 10
show 5 more comments
|
The problem here is that the remote repository URL is:
But it should be:
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:
And can change one using the "git remote set-url" command. For example:
Hope that helps! answered 05 Nov '10, 20:25 ryans ♦♦ 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
|
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?
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.
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.
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? :\
Help please!
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?
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
What version of git are you using locally? If you're not using at least v1.6, then try upgrading to a newer version.
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?
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:
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?