致命:gitlab-runner 无法访问 'config' 错误
fatal: unable to access 'config' error with gitlab-runner
我在尝试使用 gitlab-runner exec docker
:
时遇到 fatal: unable to access 'config': Permission denied
错误
$ 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.
原来我的 .git
文件夹中的文件权限被搞砸了。
运行:
chmod ug+rwX,o+rX .git -R
已解决问题。
我在尝试使用 gitlab-runner exec docker
:
fatal: unable to access 'config': Permission denied
错误
$ 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.
原来我的 .git
文件夹中的文件权限被搞砸了。
运行:
chmod ug+rwX,o+rX .git -R
已解决问题。