致命:无法使用gitlab-runner访问'config'错误

时间:2017-07-19 00:14:31

标签: gitlab-ci

尝试使用fatal: unable to access 'config': Permission denied时出现gitlab-runner exec docker错误:

$ gitlab-runner exec docker \
    --docker-volumes  /home/username/.ssh/gitlab_ci_rsa:/root/.ssh/id_rsa:ro \
    --docker-volumes `pwd`:/public \
    test1
WARNING: You most probably have uncommitted changes.
WARNING: These changes will not be tested.        
Running with gitlab-ci-multi-runner 9.1.1 (6104325)
  on  ()
Using Docker executor with image condaforge/linux-anvil:latest ...
Using docker image sha256:11c5fbc4381916d9b2a4a4aaa59eb09ca02a528a949edb9bc2d6c0fe6a485d78 for predefined container...
Pulling docker image condaforge/linux-anvil:latest ...
Using docker image condaforge/linux-anvil:latest ID=sha256:1362d71153808174f2b29cdfbe347d1ebc0bcf89d9d3bb12a84986d4dcfc2933 for build container...
Running on runner--project-0-concurrent-0 via username-desktop...
Cloning repository...
Cloning into '/builds/project-0'...
fatal: unable to access 'config': Permission denied
fatal: Could not read from remote repository.

1 个答案:

答案 0 :(得分:1)

事实证明我的.git文件夹中的文件权限已经搞砸了。

运行:

chmod ug+rwX,o+rX .git -R

解决了这个问题。