GL 5.1: 404/500 when cloning public repository (via HTTP)
Created by: sroth80021
In a clean GL 5.1 install from scratch, I create a repository and make it public. I can clone and push fine using git@...
However, when I try to clone it via the public repository HTTP url, I get a 500 error. Somewhat surprisingly, it appears to be trying to authenticate me (per apache logs). I think this might be the root of the issue. Why would I be authenticated for a public HTTP repo?
$ git clone http://some.server/foo.bar/foo.git
Cloning into 'foo'...
error: The requested URL returned error: 500 Internal Server Error while accessing http://some.server/foo.bar/foo.git/info/refs?service=git-upload-pack
fatal: HTTP request failed
in the GitLab log, I see:
Started GET "/foo.bar/foo.git/info/refs?service=git-upload-pack" for 127.0.0.1 at 2013-05-15 14:08:51 -0700
Errno::EACCES (Permission denied - /scratch/git178 upload-pack --stateless-rpc --advertise-refs .):
lib/gitlab/backend/grack_auth.rb:24:in `call'
and in the Apache log, I see:
1.2.3.4 - - [15/May/2013:21:10:09 +0000] "GET /foo.bar/foo.git/info/refs?service=git-upload-pack HTTP/1.1" 500 356 "-" "git/1.8.1.4"
When I hit the URL in a browser, I get a 404, but somewhat surprisingly, it looks like it is trying to authenticate me:
1.2.3.4 - - [15/May/2013:21:17:31 +0000] "GET /foo.bar/foo.git HTTP/1.1" 404 357 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.63 Safari/537.31"
1.2.3.4 - - [15/May/2013:21:17:31 +0000] "GET /static.css HTTP/1.1" 404 357 "http://some.server/foo.bar/foo.git" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.63 Safari/537.31"
1.2.3.4 - - [15/May/2013:21:17:31 +0000] "GET /favicon.ico HTTP/1.1" 302 109 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.63 Safari/537.31"
1.2.3.4 - - [15/May/2013:21:17:31 +0000] "GET /users/sign_in HTTP/1.1" 200 2931 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.63 Safari/537.31"
I am using Apahe proxy forwarding to Puma (on port 9292):
<VirtualHost *:80>
ServerName some.server
DocumentRoot /home/git/gitlab/public
ErrorLog /var/log/httpd/gitlab_error_log
CustomLog /var/log/httpd/gitlab_access_log combined
<Directory /home/git/gitlab/public>
AllowOverride All
Options -MultiViews
</Directory>
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://127.0.0.1:9292/
ProxyPassReverse / http://127.0.0.1: 9292/
</VirtualHost>
My gitlab-shell config.yml file has:
# GitLab user. git by default
user: git
# Url to gitlab instance. Used for api calls. Should be ends with slash.
gitlab_url: "http://some.server:80/"
http_settings:
# user: someone
# password: somepass
self_signed_cert: false
# Repositories path
repos_path: "/home/git/repositories"
# File used as authorized_keys for gitlab user
auth_file: "/home/git/.ssh/authorized_keys"
# Redis settings used for pushing commit notices to gitlab
redis:
bin: /usr/bin/redis-cli
host: 127.0.0.1
port: 6379
# socket: /tmp/redis.socket # Only define this if you want to use sockets
namespace: resque:gitlab
Any ideas? I'm stumped on this one so far... Everything except public HTTP access seems to work fine.
I am NOT using a relative URL path. (I did find an issue related to that, but this seems to be something else)