2017-01-26 13 views
2

Я пытаюсь настроить проводника докеров и успешно зарегистрировать бегун с gitlab-ce. Однако, когда работа выполняется это всегда терпит неудачу с последующим:Пользователь Gitlab-ci-token не может клонировать репозитории

Running with gitlab-ci-multi-runner 1.10.2 (d171b73) 
Using Docker executor with image python:3.4 ... 
Starting service postgres:latest ... 
Pulling docker image postgres:latest ... 
Waiting for services to be up and running... 
Pulling docker image python:3.4 ... 
Running on runner-b35ff618-project-96-concurrent-0 via toucan... 
Cloning repository... 
Cloning into '/builds/amrstratus/webportal'... 
fatal: unable to access 'https://gitlab-ci-token:[email protected]/amrstratus/webportal.git/': Failed to connect to gitlab.xxxxxx port 443: Connection refused 
ERROR: Build failed: exit code 1 

Я пытался просто клонировать репозиторий и получил подобную ошибку:

[email protected]:/tmp# git clone https://gitlab-ci-token:[email protected]/amrstratus/webportal.git/ 
Cloning into 'webportal'... 
remote: HTTP Basic: Access denied 
fatal: Authentication failed for 'https://gitlab-ci-token:[email protected]/amrstratus/webportal.git/' 

Доступ через HTTPS, кажется, работает хорошо, и все остальное похоже работа.

Любые идеи? Я полностью застрял.

системы Детали:

Debian 8 (Jessie) 
GitLab 8.16.2 
GitLab Shell 4.1.1 
GitLab Workhorse v1.3.0 
GitLab API v3 
Git 2.10.2 
Ruby 2.3.3p222 
Rails 4.2.7.1 
PostgreSQL 9.6.1 

ответ

1

Обратите внимание, что там может быть два вопроса.

Что касается самого (и fatal: Authentication failed) лексемы, см this thread

The CI token is now securely generated for each build. It's available in $CI_BUILD_TOKEN .
If you're cloning a different repository from .gitlab-ci.yml (like we were) your best bet is to use SSH.

Another solution is to use your personal private token:

git clone https://<username>:<private-token>@gitlab.anydomainhere.com/developers/<projectname>.git 

(please realize this token gives access to all your projects)

Другая проблема связана с Докер: fatal: unable to access

Вы должны быть уверены, что вы можете сообщить ваш экземпляр Gitlab (as in here или в issue 305).
И check the ownership as in this thread.

+0

Спасибо, ваше сообщение помогло мне разобраться в проблеме. Это была не проблема проверки подлинности, а проблема, связанная с докером, мой брандмауэр, блокирующий запрос. Использование docker run python: 3.4/usr/bin/curl https: //gitlab.xxxx помог мне решить эту проблему. –

0

Я знаю, что это старое, однако, для меня это было исправлено для корректировки рабочей лошади по this comment.

Модифицированный /etc/gitlab/gitlab.rb следующим образом:

раскомментировать эту строку

gitlab_workhorse['enable'] = true 

Добавить эти 2 линии

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

Затем модифицировали веб-сервер конфигурации, чтобы указать обратный прокси-сервер для этого вместо единорог.