Reputation: 454
I get this error when attempting to push to a windows server I have set up that is running GitStack.
fatal: http://xx.xx.x.xxx/mjtest.git/info/refs not found: did you run git update-server-info on the server?
This error seems to be quite common amongst people who are new to Git, GitBash and GitStack so I have found some possible solutions but none seem to work for me.
This is what I do that leads to the error, first I create an empty repository in GitStack called mjtest, I then create a user and add them to the repository and give them read and write access, then I use GitBash to create a local repository and try to push it.
git config --global user.name "XXXXXXX"
git config --global user.email XXXXXXX
mkdir ~/mjtest
cd ~/mjtest
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin http://XX.XX.X.XXX/mjtest.git
git push origin master
This then asks me for a username and then a password which I enter correctly. Once they are entered it returns the fatal error message.
Any help would be greatly appreciated.
Upvotes: 3
Views: 2133
Reputation: 6849
I looked into C:/GitStack/apache/logs/error.log and found that GitStack was looking for the repository in the wrong location although its settings said D:/Repositories (my custom location), GitStack looked for the repositories in its default location. So I simply went and saved the settings again from GitStack admin page. It solved the problem.
Upvotes: 1
Reputation: 1323953
It could be related to a control access issue.
This usually happen when the repo hasn't been set to be exported (by git-daemon
or gitweb
): GitStack could rely on a similar mechanism.
See this thread for instance/
I created an 'empty' file with the name "
git-daemon-export-ok
' inside one of my repositories.
I can now clone / push / pull to this repository without issues.
That file should be created directly under the xxx.git
root directory of your bare repo on the server.
Upvotes: 2