I have been following the steps on this page:

Hosting a Git server under Apache on Windows but at step 5 I run

git clone http://localhost/Test.git

and I get the response

Cloning into Test...
fatal: unable to access 'http://localhost/Test.git/': The requested URL returned error 403

I already used the answer to this question Setting up Git / Apache on Windows to solve a problem with the previous step. I have also tried adding

<Directory "c:/program files/git/libexec/git-core">
    Order allow,deny
    Allow from all

As was suggested in the comments at the bottom of the original page.

Can anyone explain/solve the 403 error?


There is no git-daemon-export-ok file in the repo I'm trying to clone - should there be one? (In my searching I keep coming across this but am unsure whether it is needed)

  • You seem to be missing a //. Try git clone http://localhost/Test.git – DavidPostill Jun 28 '15 at 13:12
  • @DavidPostill Sorry, that was a typo in my question - I've corrected it now. That is the exact command I run – Kvothe Jun 28 '15 at 13:14

I solved this by changing

<Directory />
    Allow from all


<Directory />
    Require all granted

which is an important change form Apache 2.2 to Apache 2.4.

Whether this completely solves everything or simply hides it until a later time I don't know though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.