Git clone fails with “/info/refs not found: did you run git update-server-info on the server?”

0

I have been running GitStack 1.4 without serious issue, and uninstalled it in order to upgrade to version 2.0

Since doing so, I have been unable to access the repositories, and any attempt to clone them results in the error:  “fatal: http://<username>:<userpass>@<server ip address>/<project name>.git/info/refs not found: did you run update-server-info on the server?”

Running the command suggested in the error message (git update-server-info) or (git –bare update-server-info) on the server had no effect on the error.  Browsing the repositories locally, I can see that the <project name>/info/refs file is present in each project.

The web – based administration of GitStack is all still working fine, and I have confirmed that the user accounts are present and set to be allowed to access the repositories.  Also, I am able to browse the repositories on the server from within a web browser on the remote computers.

The server is running Windows XP Pro (SP3), and Gitstack 2.0 and the repositories are located at G:\Gitstack and G:\GitStack\repositories.  In case it is significant, I also have GitExtensions 2.31 installed on the Server PC.

Any advice on how to resolve the situation is greatly appreciated.

Thanks, Chris Cotton.
asked May 14, 2012

5 Answers

1

Thank you for the quick response.

I am happy to report that I have found a work-around for the issue, which I have described further down this message.  First though, in response to your questions:

1) I was not able to perform a git clone on the server PC.

2) After attempting a git clone on the server, the following lines were added to the apache log files:

G:\GitStack\apache\logs:

127.0.0.1 - - [14/May/2012:12:49:26 +0100] "GET /DSP_II.git/info/refs?service=git-upload-pack HTTP/1.1" 401 401

127.0.0.1 - <username> [14/May/2012:12:49:26 +0100] "GET /<project_name>.git/info/refs?service=git-upload-pack HTTP/1.1" 404 -

127.0.0.1 - <username> [14/May/2012:12:49:26 +0100] "GET /<project_name>.git/info/refs HTTP/1.1" 404 -

and

G:\GitStack\apache\error:

[Mon May 14 12:49:26 2012] [error] [client 127.0.0.1] Repository not exported: 'G:/GitStack/repositories/<project_name>.git'

[Mon May 14 12:49:26 2012] [error] [client 127.0.0.1] Repository not exported: 'G:/GitStack/repositories/<project_name>.git'

3) Adding a user to the repository did not appear to help.

4) I am fairly certain that GitExtensions did not install a copy of msysgit, as I used the separate stand - alone installer. Upon completing installation, GitExtensions scanned the computer and linked itself to the copy of msysgit in G:\Gitstack\git\bin\ directory.

------------------------------

Now, for the workaround:

Having searched the google for solutions to similar errors, 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.

I also created a new (empty) repository using GitStack, and tried to clone it on a remote PC.  The same error occured with the new repository until I added the "git-daemon-export-ok" file to the new repository as described above.

Hopefully, this should be sufficient information to determine a permanent solution to the issue.

Thanks,

Chris Cotton.

0
/info/refs not found means that the server cannot be reached.
Are you able to perform a git clone from the server ?
Could you check the logs files in gitstack/apache/logs ?
Could you try to add and remove a user to your repository and retry the clone action ?
GitExtension is probably the issue because it installs msysgit.
0
Thanks Chris.
Unfortunately, I cannot reproduce the issue on my side on a fresh install. The issue might come from the update.
However, I am glad it works for you.
0
@Chris   tried your workaround and it worked. thanks so much. I wonder why this file is needed. I hope a staff can explain? Sorry noob on this.
jeprox
0
0
  As per this thread, 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 save the settings again from GitStack admin page. It solved the problem.

Your Answer

Please login to post questions.