Subdirectory Support in gitlab-git-http-server or nginx configuration
I use Gitlab 8.0.1 (installed manually from source) using subdirectory myhost.com/gitlab, which worked perfectly before Gitlab 8.x. I've also used the separate Gitlab CI service with multi-runner without any problems.
In Gitlab itself everything works fine, but when using the new built-in CI service (didn't migrate from the old CI and started from scratch), the multi-runner is now not able to clone the repositories.
Cloning repository...
Cloning into 'builds/69d6f323/0/gitlab/myname/myproject'...
remote: Not Found
fatal: repository 'https://gitlab-ci-token:b93dcf5d1baf416406efbd4244b5c5@myhost.com/gitlab/myname/myproject.git/' not found
I think the new gitlab-git-http-server is not able to serve the repositories when using a subdirectory on the url. He tries to find $repoRoot/gitlab/myname/myproject.git which obviously doesn't exist. Only $repoRoot/myname/myproject.git exists. Clone over HTTPS doesn't work on my machine either, same error there.
So I've tried to rewrite the url in nginx, but then following error occures:
Cloning repository...
Cloning into 'builds/69d6f323/0/gitlab/myname/myproject'...
remote: Not Found: /myname/myproject.git/info/refs
fatal: repository 'https://gitlab-ci-token:b93dcf5d1baf416406efbd4244b5c5@myhost.com/gitlab/myname/myproject.git/' not found
maybe my rewrite is wrong?
# remove the leading /gitlab from url
rewrite ^/gitlab(.*)$ $1;
It'd be much easier if the new http service also supports subdirectory configurations.