GitLab CI/CD 的报错如下:
Get https://registry-1.docker.io/v2/library/openjdk/manifests/11: Get https://auth.docker.io/token?scope=repository%3Alibrary%2Fopenjdk%3Apull&service=registry.docker.io: read tcp 172.17.0.2:34818->54.236.165.68:443: read: connection reset by peer
私有镜像仓库是通过 docker-compose 启动的,docker container logs -f docker-registry_registry_1
的日志如下:
time="2021-07-20T10:21:00.32369399Z" level=warning msg="error authorizing context: basic authentication challenge for realm "Registry": invalid authorization credential" go.version=go1.11.2 http.request.host="localhost:5000" http.request.id=0c53faae-b4f7-4045-aaca-5f46f695e5e8 http.request.method=GET http.request.remoteaddr="172.19.0.1:39438" http.request.uri="/v2/" http.request.useragent="docker/18.09.9 go/go1.11.13 git-commit/039a7df9ba kernel/5.4.0-73-generic os/linux arch/amd64 UpstreamClient(Docker-Client/18.09.9 \(linux\))"
time="2021-07-20T10:21:00.341567217Z" level=info msg="authorized request" go.version=go1.11.2 http.request.host="localhost:5000" http.request.id=c0e7d139-ddd0-42a9-8357-047f2d816659 http.request.method=GET http.request.remoteaddr="172.19.0.1:39444" http.request.uri="/v2/" http.request.useragent="docker/18.09.9 go/go1.11.13 git-commit/039a7df9ba kernel/5.4.0-73-generic os/linux arch/amd64 UpstreamClient(Docker-Client/18.09.9 \(linux\))"
time="2021-07-20T10:21:00.341643848Z" level=info msg="response completed" go.version=go1.11.2 http.request.host="localhost:5000" http.request.id=c0e7d139-ddd0-42a9-8357-047f2d816659 http.request.method=GET http.request.remoteaddr="172.19.0.1:39444" http.request.uri="/v2/" http.request.useragent="docker/18.09.9 go/go1.11.13 git-commit/039a7df9ba kernel/5.4.0-73-generic os/linux arch/amd64 UpstreamClient(Docker-Client/18.09.9 \(linux\))" http.response.contenttype="application/json; charset=utf-8" http.response.duration=3.213474ms http.response.status=200 http.response.written=2
在 ECS 上 publish 镜像到私有镜像仓库没问题,但在 GitLab CI/CD 中却不行,有人知道是什么问题吗?😭
其实真正的问题是pull不到image,是我自己搞错了,跟GitLab CI/CD没啥关系。但是只有这一台服务器pull不到,其它服务器是可以的。
刚刚发现了一个类似的主题:registry-1.docker.io 无法访问 - V2EX
1
simonlu9 2021-07-20 19:01:03 +08:00
你要先登录吧
|
2
JasonLaw OP |
4
a2001103 2021-07-21 00:02:42 +08:00
gitlab 是怎么部署的呀
|