tags:

views:

101

answers:

2

I logged into my server, and created a git repo:

(reference: http://kb.mediatemple.net/questions/1594/Using+Git)

So I created a folder:

blah.git

I then did:

git --bare init

I then went into the hooks folder and changed the permissions on the post-update.

Now locally on windows, I tried this:

git clone http://git.example.com/blah.git

and got this message:

initialized empty git in e:/gitTest/blah/.git/ fatal: http://git.example.com/blah.git/info/refs not found, did you run git update-server-info on the server?

Well I did run that command on the server. And it seems the file info/refs does exist, but doing a cat on it shows that it is empty.

am I missing a step?

+1  A: 

Sanity check: I assume the hostname in your clone URL is not literally git.example.com.

Is the protocol HTTP or HTTPS? If the latter and you're using a self-signed certificate, you'll need to disable SSL verification with the GIT_SSL_NO_VERIFY environment variable for the clone. After that, set http.sslVerify to false with git config.

Do you need to provide authentication credentials to the web server?

Git over HTTP is a painful way to do it: it's s-l-o-w, and the error messages tend to be unhelpful even to the experienced. For an example of the latter, the error you're seeing about a missing info/refs could be an authentication problem.

Greg Bacon
+2  A: 

There are no commits and, hence, no refs on your sever's repository. So, there's nothing to clone.

Pat Notz
Indeed, as far as I know, git will not clone an empty repository.
ebneter