请求访问资源被拒绝

请求访问资源被拒绝

本文介绍了拒绝:请求访问资源被拒绝:docker的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在关注

谁能给我一些关于这个问题的提示?任何帮助将不胜感激.

注意:我已经成功登录到docker

解决方案

您可能需要在 docker push 之前将您的 docker repo 切换为私有.

感谢 答案dean-wu">Dean Wu 和 这条评论来自ses,推送前记得退出,然后从命令行登录到您的 docker hub 帐户

# 你可能需要先登出`docker logout` ref.https://stackoverflow.com/a/53835882/248616登录

根据文档:

您需要包含 Docker Hub 的命名空间以将其与您的帐户相关联.命名空间与您的 Docker Hub 帐户名称相同.您需要将图像重命名为 YOUR_DOCKERHUB_NAME/docker-whale.

因此,这意味着您必须在推送之前标记您的图片:

docker tag firstimage YOUR_DOCKERHUB_NAME/firstimage

然后你应该能够推送它.

docker push YOUR_DOCKERHUB_NAME/firstimage

I am following this link to create my first docker Image and it went successfully and now I am trying to push this Image into my docker repository from this link. But whenever I am trying to push this Image into repository , I got this type of error.

denied: requested access to the resource is denied

Could anyone give me some hint towards this problem ? Any help would appreciated.

Note: I have successfully login into docker

解决方案

You may need to switch your docker repo to private before docker push.

Thanks to the answer provided by Dean Wu and this comment by ses, before pushing, remember to log out, then log in from the command line to your docker hub account

# you may need log out first `docker logout` ref. https://stackoverflow.com/a/53835882/248616
docker login

According to the docs:

You need to include the namespace for Docker Hub to associate it with your account.
The namespace is the same as your Docker Hub account name.
You need to rename the image to YOUR_DOCKERHUB_NAME/docker-whale.

So, this means you have to tag your image before pushing:

docker tag firstimage YOUR_DOCKERHUB_NAME/firstimage

and then you should be able to push it.

docker push YOUR_DOCKERHUB_NAME/firstimage

这篇关于拒绝:请求访问资源被拒绝:docker的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 10:58