fatal: unable to access 'https://gitlab.syntaxjuggler.com/dev/project.git/': The requested URL returned error: 403

При запуске pipeline выдаёт 403 ошибку на репозитории абсолютно любой доступности (private, internal, protected). Пробовал так же менять конфигурацию пайплайна но это ничего не меняет т.к выполнение до неё не доходит а ошибка возникает при выполнении базовых встроенных команд.

Я использую GitLab self-managed в Kubernetes, GitLab Runner тоже размещены в Kubernetes

Pipeline


stages:
  - build
  - step1
  - step2

variables:
  REGISTRY: "https://index.docker.io/v1/"
  VERSION:
    value: ""
    description: "Введите tag (версию) контейнера. Пример: v0.0.1"

.build: &build_def
  stage: build
  image:
    name: gcr.io/kaniko-project/executor:v1.11.0-debug
    entrypoint: [""]
  before_script:
    - |
      if [ -z $VERSION ]; then
        echo "Please select a container version"
        exit 1 
      fi
    - echo ${PROJECT_DIR}
    - echo ${CONTAINER_NAME}
    - echo "{\"auths\":{\"${REGISTRY}\":{\"auth\":\"$(printf "%s:%s" "${REGISTRY_USER}" "${REGISTRY_PASSWORD}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
  script:
    - echo "Build container..."
    - /kaniko/executor 
      --context $PROJECT_DIR 
      --dockerfile $PROJECT_DIR/Dockerfile 
      --destination ${CONTAINER_NAME}
  tags:
    - test
  when: manual
  only:
    - web

application1: 
  <<: *build_def
  variables:
    CONTAINER_NAME: bigkaa/gitlab-application1:${VERSION}
    PROJECT_DIR: ${CI_PROJECT_DIR}/application1

application2: 
  <<: *build_def
  variables:
    CONTAINER_NAME: bigkaa/gitlab-application2:${VERSION}
    PROJECT_DIR: ${CI_PROJECT_DIR}/application2

step1:
  stage: step1 
  cache:
    key: test-cache
    paths:
      - some_path/
  script:
    - mkdir some_path
    - echo "Hello from step1" > some_path/hello.txt 
  tags:
    - stage
  when: manual
  only:
    - web

step2:
  stage: step2 
  cache:
    key: test-cache
    paths:
      - some_path/
  script:
    - cat some_path/hello.txt
  tags:
    - stage
  when: manual
  only:
    - web

Команда установки gitlab-runner

helm install gitlab-runner gitlab/gitlab-runner \
  --namespace gitlab \
  --set gitlabUrl=https://gitlab.syntaxjuggler.com \
  --set runnerRegistrationToken=token \
  --set runnerExecutor=kubernetes \
  --set rbac.create=true \
  --set serviceAccount.create=true

Конкретная ошибка при стартe runner

Running with gitlab-runner 17.2.1 (9882d9c7)
  on gitlab-runner-848474899d-2hxfg ZCLbfgpyE, system ID: r_5D9FZv9JrMxM
Preparing the "kubernetes" executor
00:00
Using Kubernetes namespace: gitlab
Using Kubernetes executor with image ubuntu:22.04 ...
Using attach strategy to execute scripts...
Preparing environment
00:04
Using FF_USE_POD_ACTIVE_DEADLINE_SECONDS, the Pod activeDeadlineSeconds will be set to the job timeout: 1h0m0s...
Waiting for pod gitlab/runner-zclbfgpye-project-2-concurrent-0-aquc04fn to be running, status is Pending
Running on runner-zclbfgpye-project-2-concurrent-0-aquc04fn via gitlab-runner-848474899d-2hxfg...
Getting source from Git repository
00:00
Fetching changes with git depth set to 20...
Initialized empty Git repository in /builds/root/test2/.git/
Created fresh repository.
fatal: unable to access 'https://gitlab.syntaxjuggler.com/root/test2.git/': The requested URL returned error: 403
Cleaning up project directory and file based variables
00:01
ERROR: Job failed: command terminated with exit code 1

Ответы (0 шт):