我正在尝试使用带有 GKE 集群的 GitLab CI 来执行管道。我有使用 Docker runner 的经验,但 GKE 对我来说仍然很陌生,这是我所做的:
使用以下内容 before_script 创建 gitlab-ci.yml: - php -v
standard:
image: falnyr/php-ci-tools:php-cs-fixer-7.0
script:
- php-cs-fixer fix --diff --dry-run --stop-on-violation -v --using-cache=no
lint:7.1:
image: falnyr/php-ci:7.1-no-xdebug
script:
- composer build
- php vendor/bin/parallel-lint --exclude vendor .
cache:
paths:
- vendor/
推送提交到存储库
管道输出如下
Running with gitlab-runner 10.3.0 (5cf5e19a)
on runner-gitlab-runner-666dd5fd55-h5xzh (04180b2e)
Using Kubernetes namespace: gitlab-managed-apps
Using Kubernetes executor with image falnyr/php-ci:7.1-no-xdebug ...
Waiting for pod gitlab-managed-apps/runner-04180b2e-project-5-concurrent-0nmpp7 to be running, status is Pending
Running on runner-04180b2e-project-5-concurrent-0nmpp7 via runner-gitlab-runner-666dd5fd55-h5xzh...
Cloning repository...
Cloning into '/group/project'...
remote: You are not allowed to download code from this project.
fatal: unable to access 'https://gitlab-ci-token:[email protected]/group/project.git/': The requested URL returned error: 403
ERROR: Job failed: error executing remote command: command terminated with non-zero exit code: Error executing in Docker Container: 1
现在我想我应该在某处添加一个带有密码的 gitlab-ci-token 用户,不确定它是否应该像这样工作。
谢谢!
在阅读有关该主题的更多信息后,似乎应该仅通过 HTTPS(而不是 SSH)来执行管道。
我启用了 HTTPS 通信,当我以项目中的用户身份执行管道时(未添加到项目的管理员会引发此错误),它可以正常工作。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句