首页 > 解决方案 > Docker 请求对资源的访问被拒绝

问题描述

我读过被拒绝:请求访问资源被拒绝:码头工人和我做同样的事情,但访问仍然被拒绝。

docker tag my_image my_name/rep:tag
docker push my_name/rep:tag

但我明白了

denied: requested access to the resource is denied

我想问题出在

docker login

如果我输入错误的密码,我会得到

incorrect username or password

如果我输入正确的密码,我 在此处输入图像描述 看不到

login succeeded

我试过了

docker login -u username -p password

并得到

Using --password via the CLI is insecure. Use --password-stdin 

我尝试使用 --password-stdin 并得到相同的结果

标签: docker

解决方案


我用Git Bash - 谢谢@michalk 通过Git Bash它似乎

$ docker login -u usename -p password
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in C:\Users\..............docker\config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded

推荐阅读