gitlab won’t clone from repo in same project group

  Kiến thức lập trình

We have GitLab Community edition.

We have a bunch of projects in a group. They are all deployed in the same way, so I want to use a shared pipeline definition. I can achieve that by putting the pipeline definition into another project in the same group and using include:project to reference it from the .gitlab-ci.yml files. So far, so good.

Now, my pipeline needs to run some PowerShell scripts for the deployment stages. I have put them in the same project as the pipeline definition. How can I access them? I am trying to use git clone with the CI_JOB_TOKEN variable. It appears to be making use of that token, but comes back with,

Cloning into 'my-deployment'...
remote: You are not allowed to download code from this project.
fatal: unable to access 'https://myserver/mygroup/my-deployment.git/': The requested URL returned error: 403

What is going on? I can include the .yml pipeline files in the same project but can’t get at the other files?

LEAVE A COMMENT