403 Forbidden for git repository over http
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: users@xxxxxxxxxxxxxxxx
- Subject: 403 Forbidden for git repository over http
- From: "Amit Agrawal88" <amitag88@xxxxxxxxxx>
- Date: Mon, 22 Aug 2016 17:51:11 +0530
- Reply-to: users@xxxxxxxxxxxxxxxx
Hi All,
I am trying to setup a central Git server which can be accessed over HTTP protocol.
I have installed Bitnami WAMP stack with Apache 2.4 version. The Git repository is located in C:\Git\Repos.
In httpd.conf file, I have changed the Document Root folder to C:\Git\Repos
DocumentRoot "C:\Git\Repos"
<Directory "C:\Git\Repos">
Options All
AllowOverride All
Require all granted
</Directory>
There are not .httpaccess file in C:\Git\Repos so 'AllowOverride All' has no effect, I could have kept it None as well. To begin with, I am just trying to serve git repository over http and hence I have allowed access to everybody.
The Env variable for Git has been set and all GET request ending with /git/ is redirected to git-http-backend.
SetEnv GIT_PROJECT_ROOT "C:\Git\Repos"
SetEnv GIT_HTTP_EXPORT_ALL
ScriptAlias /git/ "C:/Program Files/Git/mingw64/libexec/git-core/git-http-backend/"
However, I get 403 Forbidden error when I try to clone the repository like this
. Following is the error in access log
::1 - - [22/Aug/2016:16:44:54 +0530] "GET /git/ HTTP/1.1" 403 213
Error in Error Log
[client ::1:64266] AH01630: client denied by server configuration: C:/Program Files/Git/mingw64/libexec/git-core/git-http-backend
So it looks like git-http-backend is not allowing this access. As per the documentation, it concatenates environment variables PATH_INFO with GIT_PROJECT_ROOT which seems be correctly set. I also tried "AcceptPathInfo On" but that didn't help.
I have been reading and trying lots of things like the ones mentioned below including searching this forum to any solution to this but still in vain.
I have tried to give location access to /git/ path but that didn't help
<LocationMatch "^/git/">
AuthType Basic
AuthName "Git Access"
Require all granted
</LocationMatch>
Also for all fetch requests
<LocationMatch "^/git/.*/git-receive-pack$">
AuthType Basic
AuthName "Git Access"
Require group committers
...
</LocationMatch>
I also given Read/write access to C:\Git\Repos to ALL users in the system. I am using Windows Server 2012 R2.
I have a feeling that either some of the above configuration is wrong OR git-http-backend is expecting something which I have not set.
I have been trying to setup the access for last few days and above are just few of things that I tried. Kindly help.
Please don't remove this post as I searched the forum already and didn't come across any similar post with solution.
Regards,
Amit
(See attached file: httpd.conf)
Attachment:
httpd.conf
Description: Binary data
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
[Index of Archives]
[Open SSH Users]
[Linux ACPI]
[Linux Kernel]
[Linux Laptop]
[Kernel Newbies]
[Security]
[Netfilter]
[Bugtraq]
[Squid]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Samba]
[Video 4 Linux]
[Device Mapper]