无法登录Docker将映像推送到Github

时间:2020-06-29 08:22:36

标签: docker github-package-registry

成功(至少根据命令输出)使用docker.pkg.github.com对Docker进行身份验证之后,

λ cat ~/.github/packages-token.txt | docker.exe login -u tomasaschan --password-stdin docker.pkg.github.com
Login Succeeded

我尝试将图片推送到Github,但失败:

λ docker.exe push docker.pkg.github.com/tomasaschan/vscode-devcontainers/haskell:0.1
The push refers to repository [docker.pkg.github.com/tomasaschan/vscode-devcontainers/haskell]
5fdec462bfdd: Preparing
7d011632d389: Preparing
ee33ab0520f7: Preparing
c2dc9b7d0afb: Preparing
e3cd6c1b7a6f: Preparing
85a531a5f8ac: Waiting
33824b0902b0: Waiting
7a02eb6fb081: Waiting
97499bae1648: Waiting
ed55a3118900: Waiting
97b8ab1c4a52: Waiting
bbd0d835d261: Waiting
5ee6297cd05f: Waiting
3b6e130eaa4b: Waiting
05f3b67ed530: Waiting
ec1817c93e7c: Waiting
9e97312b63ff: Waiting
e1c75a5e0bfa: Waiting
unauthorized: Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.

据我所知,我的Docker配置看起来很不错(请注意,我在上面使用docker.exe不必担心它从哪里读取配置):

 λ cat /mnt/c/Users/tomasl/.docker/config.json
{
        "auths": {
                "docker.pkg.github.com": {},
                "https://index.docker.io/v1/": {}
        },
        "HttpHeaders": {
                "User-Agent": "Docker-Client/19.03.8 (windows)"
        },
        "credsStore": "desktop",
        "credHelpers": {
                "asia.gcr.io": "gcloud",
                "eu.gcr.io": "gcloud",
                "gcr.io": "gcloud",
                "marketplace.gcr.io": "gcloud",
                "staging-k8s.gcr.io": "gcloud",
                "us.gcr.io": "gcloud"
        },
        "stackOrchestrator": "swarm"
}

我需要做什么才能将Docker映像推送到docker.pkg.github.com?

0 个答案:

没有答案