Hello,
A GitLab server already has a number of projects. An account has been created for me and I want to create a GitLab Runner for these projects. I created a .gitlab-ci.yml file in the project and wrote commands like the following in it:
stages:
- build
- deploy
cache:
paths:
- node_modules/
build-project:
stage: build
script:
- rm -rf node_modules
- cd /SOURCE/
- git clone http://USER:PASS@IP/jason/project.git
tags:
- backend
- project
deploy-project:
stage: deploy
script:
- cd /YAML
- docker compose up -d project
tags:
- backend
- project
I created a runner for this project in the CI/CD Settings section. Now in the Pipelines section I get the permission related error:
Running with gitlab-runner 16.11.0 (91a27b2a)
on project ETyfPxwzq, system ID: s_a88f5fe318c9
Preparing the "shell" executor
Using Shell (bash) executor...
Preparing environment
Running on Project-Server...
Getting source from Git repository
Fetching changes with git depth set to 20...
Reinitialized existing Git repository in /YAML/builds/ETyfPxwzq/0/jason/project/.git/
remote: You are not allowed to download code from this project.
fatal: unable to access 'http://IP/jason/project.git/': The requested URL returned error: 403
ERROR: Job failed: exit status 1
I’m guessing it’s a problem with my user account because when I create a new project myself and use the same .gitlab-ci.yml I don’t get any errors.
Which part of my account should I check?
Thank you.