我正在尝试从我的主项目中同一组内的另一个项目访问 gitlab yaml

Ram*_*amK 2 gitlab gitlab-ci

代码:

include:
  - project: 'testing-parent-pipeline/Testing-child-push'

    file: 'script/test.yml'
Run Code Online (Sandbox Code Playgroud)

我收到这个错误

testing-parent-pipeline/Testing-child-push未找到项目或访问被拒绝!确保管道配置中的所有包含内容均已正确定义。

小智 6

请尝试检查您的项目的绝对路径是什么。为了确保路径正确,请检查

settings -> general -> advanced
Run Code Online (Sandbox Code Playgroud)

当您展开高级时,有一个名为的部分,change path您将在其中看到真正的路径。像这样使用它作为正确的路径

include:
  - project: 'testing-parent-pipeline/Testing-child-push'
    ref: master
    file: 
      -'script/test.yml'
Run Code Online (Sandbox Code Playgroud)