When I make Eclipse -> File -> Import -> Projects -> Projects from Git -> Clone URI -> enter repository HTTPS URI from Gitlab, I get error:
Possible reasons:
Incorrect URL
No network connection (e.g. wrong proxy settings)
SSL host could not be verified (set http.sslVerify=false in Git configuration)
I have added http.sslVerify false
in Eclipse configuration but it still does not work.
If I make git clone https://my.example.com/gitlab/root/repository.git
in cmd, I get:
Cloning into 'repository'...
fatal: unable to access 'https://my.example.com/gitlab/root/repository.git': The requested URL returned error: 500
Gitlab production logs show:
Processing by Projects::GitHttpController#info_refs as HTML
Parameters: {"service"=>"git-upload-pack", "namespace_id"=>"java", "project_id"=>"project.git"}
Выполнено 500 внутренних ошибок сервера за 102 мс (ActiveRecord: 2,5 мс)
JWT :: DecodeError (нулевой веб-токен JSON):
lib / gitlab / workhorse.rb: 120: в 'verify_api_request!'
приложение / контроллеры / проекты / git_http_client_controller.rb: 154: в 'verify_workhorse_api!'
lib / gitlab / request_profiler / middleware.rb: 15: в "вызове"
lib / gitlab / middleware / go.rb: 16: в `call '
URL-адрес SSH работает хорошо.
Gitlab используется с Apache2 и HTTPS. /etc/gitlab/gitlab.rb
содержит:
external_url ' https://my.example.com/gitlab '
web_server ['имя пользователя'] = 'apache' # 'gitlab-www'
web_server ['группа'] = 'apache' # 'gitlab-www'
nginx ['enable'] = false
unicorn['listen'] = '127.0.0.1'
unicorn['port'] = 9099
/etc/apache2/apache2.conf
contains:
ProxyPass /gitlab http://127.0.0.1:9099/gitlab
ProxyPassReverse /gitlab http://127.0.0.1:9099/gitlab
RequestHeader add X-Forwarded-Proto https
Used versions:
GitLab 8.14.5
GitLab Shell 4.0.3
GitLab Workhorse 1.1.1
GitLab API v3
Git 2.7.4
There is article about similar problem Fixing issues with cloning via HTTPS on GitLab but modifying /etc/gitlab/gitlab.rb
gitlab-workhorse configuration didn't help.
Similar problems: Ошибка 500 при операции git с использованием HTTP (S) с Apache в качестве обратного прокси
Как решить эту проблему?
Включено gitlab-workhorse на порту 9191:
external_url 'https://my.example.com/gitlab'
gitlab_workhorse['enable'] = true
. gitlab_workhorse['listen_network'] = "tcp"
gitlab_workhorse['listen_addr'] = "127.0.0.1:9191"единорог['listen'] = '127.0.0.1'
единорог['порт'] = 9099web_server['внешние_пользователи'] = ['www-data']
web_server['username'] = 'apache' #'gitlab-www'
web_server['group'] = 'apache' #'gitlab-www'nginx['enable'] = false
Это вся конфигурация gitlab.rb, остальные строки закомментированы.
И сделано proxyPass
в /etc/apache2/apache2. conf
в gitlab-рабочую лошадку, работающую на порту 9191 вместо Unicorn:
ProxyPass /gitlab http://127.0.0.1:9191/gitlab
RequestHeader добавил X-Forwarded-Proto "https"
. RequestHeader установил X-Forwarded-Ssl на