Почему не запускается gitlab-runner?
У меня стоит gitlab-ce в закрытом контуре, я прокинул все нужные порты 80,443,2222(вместо 22) наружу Доступ в морду и к стягиванию репы на лок компе есть, пуш тоже работает Когда на удаленных серверах я ставлю gitlab-runner вне зависимости от того какой тип раннера я выбираю я получаю ошибку
При установке раннеров ошибок я не получаю Моя gitlab-ce версия 16.4 на сервере ubuntu
Ошибки раннеров
Running with gitlab-runner 16.5.0 (853330f9)
on shitl, system ID: s_788d171ff39b
Preparing the "shell" executor
00:00
Using Shell (bash) executor...
Preparing environment
00:00
Running on prod-devops...
Getting source from Git repository
00:00
Fetching changes with git depth set to 20...
Reinitialized existing Git repository in /home/gitlab-runner/builds/Vgzs9kw_s/0/mvp/front/.git/
remote: Nil JSON web token
fatal: unable to access 'https://gitlab.tech/mvp/front.git/': The requested URL returned error: 403
Cleaning up project directory and file based variables
00:00
Так же замечена проблема при стягивании через https
❯ git clone https://oauth:[email protected]/mvp/front.git
Cloning into 'front'...
remote: Nil JSON web token
fatal: unable to access 'https://gitlab.tech/mvp/front.git/': The requested URL returned error: 403
Мой gitlab.rb
sudo cat /etc/gitlab/gitlab.rb | grep -v '#'
external_url 'https://gitlab.tech'
gitlab_rails['backup_path'] = "/etc/gitlab/backup/"
git_data_dirs({
"default" => {
"path" => "/mnt/newdisk/git-data"
}
})
gitlab_rails['gitlab_shell_ssh_port'] = 2222
puma['listen'] = '127.0.0.1'
puma['port'] = 8080
gitlab_sshd['enable'] = true
gitlab_sshd['listen_address'] = '0.0.0.0:2222'
nginx['enable'] = false
nginx['redirect_http_to_https'] = true
nginx['ssl_certificate'] = "/etc/letsencrypt/live/.tech/fullchain.pem"
nginx['ssl_certificate_key'] = "/etc/letsencrypt/live/.tech/privkey.pem"
gitlab_rails['ldap_enabled'] = true
gitlab_rails['ldap_servers'] = YAML.load <<-EOS
main:
label: 'LDAP'
host: 'localhost'
port: 389
uid: 'uid'
method: 'plain'
active_directory: false
allow_username_or_email_login: false
EOS
Мой nginx
server {
listen 80;
server_name gitlab.tech;
return 301 https://$host$request_uri; # Принудительное использование HTTPS
server_tokens off;
}
server {
listen 443 ssl http2;
server_name gitlabv.tech;
# ssl on;
ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 5m;
ssl_certificate /etc/letsencrypt/live/.tech/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/.tech/privkey.pem;
location ~ ^/(assets)/ {
root /opt/gitlab/embedded/service/gitlab-rails/public;
gzip_static on; # to serve pre-gzipped version
expires max;
add_header Cache-Control public;
}
server_tokens off;
location / {
client_max_body_size 0;
proxy_pass http://localhost:8080;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Ssl on;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect off;
proxy_request_buffering off;
}
}
Ответы (1 шт):
Автор решения: Miekrif
→ Ссылка
Проблема была в моей настройке gitlab-ce, я указал ему ссылатсья на puma а не на nginx