"invalid advertisement" on pull after upgrade to GitLab 8.5 [SOLVED]

Since upgrading to GitLab 8.5 (now 8.5.1) our git clients are unfortunately unable to communicate with the server via http. When using the any pull/push functionality via Eclipse we get the error:

invalid advertisement of {“GL_ID”:“user-2”,“RepoPath”:"/var/data/gitroot/repositories/openwga-product-plugins/enterprise-social-network.git"}

On git commandline the problem is different. Cloning a repo will always clone an “empty repository”, although there are files existing in that project.

What I think happens: The repository URLS “…/group/project-name.git” are all redirected to “…/group/project-name”, which is the projects HTML page. This is at least what accessing those repository URLs via browser does. Of course our git clients are not able to work with the HTML page. But I have no idea why it started doing that.

The Server is Ubuntu 12.04.5 LTS. We have an Apache server route HTTP to the Gitlab Server, but I was able to reproduce the issue also with the included Nginx server.

Thanks for any insight!

Nevermind. Contrasting the configuration with another GitLab 8.5 instance, that still works I saw that the redirect instructions on the problematic apache host config did not yet differ between HTTP requests to the rails app and those to the “workhorse” (which I assume is the Git communication). Dunno why the problem also existed directly via Nginx. Dunno why it worked before the upgrade.

However, for anyone also treading on this issue: My redirection config on the apache site config, copied from some location lost in time:

  <Location />
    # New authorization commands for apache 2.4 and up
    # http://httpd.apache.org/docs/2.4/upgrading.html#access
    Require all granted

    #Allow forwarding to gitlab-workhorse
    ProxyPassReverse http://127.0.0.1:8181
    #Allow forwarding to GitLab Rails app (Unicorn)
    ProxyPassReverse http://127.0.0.1:8090
    ProxyPassReverse http://my-host-name/
  </Location>

  # Apache equivalent of nginx try files
  # http://serverfault.com/questions/290784/what-is-apaches-equivalent-of-nginxs-try-files
  # http://stackoverflow.com/questions/10954516/apache2-proxypass-for-rails-app-gitlab
  RewriteEngine on

  #Forward these requests to gitlab-workhorse
  RewriteCond %{REQUEST_URI} ^/[\w\.-]+/[\w\.-]+/gitlab-lfs/objects.* [OR]
  RewriteCond %{REQUEST_URI} ^/[\w\.-]+/[\w\.-]+/builds/download.* [OR]
  RewriteCond %{REQUEST_URI} ^/[\w\.-]+/[\w\.-]+/repository/archive.* [OR]
  RewriteCond %{REQUEST_URI} ^/api/v3/projects/.*/repository/archive.* [OR]
  RewriteCond %{REQUEST_URI} ^/ci/api/v1/builds/[0-9]+/artifacts.* [OR]
  RewriteCond %{REQUEST_URI} ^/[\w\.-]+/[\w\.-]+/(info/refs|git-upload-pack|git-receive-pack)$
  RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA,NE]

  #Forward any other requests to GitLab Rails app (Unicorn)
  RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f [OR]
  RewriteCond %{REQUEST_URI} ^/uploads
  RewriteRule .* http://127.0.0.1:8090%{REQUEST_URI} [P,QSA,NE]

  # needed for downloading attachments
  DocumentRoot /opt/gitlab/embedded/service/gitlab-rails/public

For that to work the workhorse is redirected to port 8181 to avoid conflict with some other service using 8080. On the /etc/gitlab/gitlab.rb:

gitlab_workhorse['listen_network'] = "tcp"
gitlab_workhorse['listen_addr'] = "127.0.0.1:8181"