I get a 403 error when trying to clone repositories.
The repository is hosted on Phabricator
**policy.allow-public** set to **true**
Web Service works fine.
Below the full output from the console:
root@server:~# GIT_CURL_VERBOSE=1 git clone http://code.example.com/diffusion/TEST/test.git
Cloning into 'test'...
* Couldn't find host code.example.com in the .netrc file; using defaults
* About to connect() to code.example.com port 80 (#0)
* Trying 192.168.168.111... * connected
> GET /diffusion/TEST/test.git/info/refs?service=git-upload-pack HTTP/1.1
User-Agent: git/1.7.9.5
Host: code.example.com
Accept: */*
Pragma: no-cache
* The requested URL returned error: 401
* Closing connection #0
Username for 'http://code.example.com': admin
Password for 'http://admin@code.example.com':
* Couldn't find host code.example.com in the .netrc file; using defaults
* About to connect() to code.example.com port 80 (#0)
* Trying 192.168.168.111... * connected
> GET /diffusion/TEST/test.git/info/refs?service=git-upload-pack HTTP/1.1
User-Agent: git/1.7.9.5
Host: code.example.com
Accept: */*
Pragma: no-cache
* HTTP 1.0, assume close after body
< HTTP/1.0 401 You must log in to access this repository.
< Date: Tue, 22 Apr 2014 07:34:32 GMT
< Server: Apache/2.2.22 (Ubuntu)
< X-Powered-By: PHP/5.3.10-1ubuntu3.11
< WWW-Authenticate: Basic realm="Phabricator Repositories"
< Content-Length: 46
< Connection: close
< Content-Type: text/html; charset=UTF-8
<
* Closing connection #0
* Issue another request to this URL: 'http://code.example.com/diffusion/TEST/test.git/info/refs?service=git-upload-pack'
* Couldn't find host code.example.com in the .netrc file; using defaults
* About to connect() to code.example.com port 80 (#0)
* Trying 192.168.168.111... * connected
* Server auth using Basic with user 'admin'
> GET /diffusion/TEST/test.git/info/refs?service=git-upload-pack HTTP/1.0
Authorization: Basic YWRtaW46S2FtZW5pcHphMDA3
User-Agent: git/1.7.9.5
Host: code.example.com
Accept: */*
Pragma: no-cache
* The requested URL returned error: 403
* Closing connection #0
* Couldn't find host code.example.com in the .netrc file; using defaults
* About to connect() to code.example.com port 80 (#0)
* Trying 192.168.168.111... * connected
* Server auth using Basic with user 'admin'
> GET /diffusion/TEST/test.git/info/refs HTTP/1.1
Authorization: Basic YWRtaW46S2FtdW5pdHphMDA3
User-Agent: git/1.7.9.5
Host: code.example.com
Accept: */*
Pragma: no-cache
* The requested URL returned error: 403
* Closing connection #0
error: The requested URL returned error: 403 while accessing http://code.example.com/diffusion/TEST/test.git/info/refs
fatal: HTTP request failed
VirtualHost Configuration:
<VirtualHost *:80>
# Change this to the domain which points to your host.
ServerName code.example.com
ServerAdmin webmaster@example.com
ServerAlias code.example.com
# Change this to the path where you put 'phabricator' when you checked it
# out from GitHub when following the Installation Guide.
#
# Make sure you include "/webroot" at the end!
DocumentRoot /opt/phabricator/webroot/
RewriteEngine On
RewriteRule ^/rsrc/(.*) - [L,QSA]
RewriteRule ^/favicon.ico - [L,QSA]
RewriteRule ^(.*)$ /index.php?__path__=$1 [B,L,QSA]
<Directory /opt/phabricator/webroot>
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error-git.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel debug
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>