-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker push: unauthorized: authentication required #645
Comments
Same error that happened on CentOS 7.2 with Docker 1.9.1 is also happening on another box running Fedora with Docker 1.10.3 |
Same issue happening to me: |
Talked to people in #atomic and it looks like this is a regression in the CentOS package. The RPM from Docker doesn't have this issue. v1.10.2 solves it but it has not been pushed to updates yet. You can try fixing config.json manually. |
@dkhaws77 your ~/.docker/config.json should use "https://index.docker.io/v1/" instead of "docker.io" as the registry name. |
Perfect. Thanks @gtirloni. |
I believe this issue and distribution/distribution#1679 both involve a lack of syntax checking for doing a build enabling deep pebkac'ry
For example
succeeds without the Previously I was doing
and when pushing
|
@dkhaws77 @gtirloni My config.json file contains the "https://index.docker.io/v1/" instead of "docker.io" but still sam problem of unauthorized: authentication required |
Try bouncing Docker after making the change to the url On Thu, Jun 30, 2016 at 6:58 AM, baibhavVishal [email protected]
|
@baibhavvishal do you have a repo on docker hub? i had the same issue. You need to create a repo first which will be in the format of {username}/{project_name} and then you need to name your image the same way. Hopefully that fixes your problem |
@seanjensengrey Totally worked out!!! Thannks man! |
@gtirloni Thanks a lot,it well done |
@seanjensengrey hi,l meet a problem ,could you help me.. |
Same issue - Unable to login. Server: |
Having the same problem- uploading my first self-built image, and it seems like it's working (multiple layers have uploaded), but the last three layers always upload, then it spits out the error:
Docker config looks like:
I'm on latest macOS. Thank you for any help. |
i also get something like what @jmhmd showed: $ docker push : this is a very large build, and the upload bandwidth isn't that great, so i'm guessing it might have something to do with some sort of timeout... |
I faced the same issue while starting out with my first docker push. and surprisingly this issue appears only on Client Node but works on Docker Host (where Dameon Runs). One observation though, please make sure that you are using same Docker_username on both HOST and Client nodes. |
My config file after login Tried many times to push but always failed after 100% .. :( When I done it for the first time with another image it was successful. |
This issue is closed, but I really don't understand if anyone already solved the issue described by @phistakis and @jmhmd ? |
@phistakis did you solve your problem? I am currently facing the problem... sometime the push is successful but sometime not.. it is a large push and wasting a significant amount of time |
Same here, having the same issue with Docker for Mac. Push fails for images >1G |
If you're pushing to organization repository make sure you've added yourself in it to the |
Having the same issue. Command line push from Ubuntu VM. Works perfectly on my other repos under the same organization, syntax, and credentials. All repos have identical collaborators with write or admin permissions. It's quite confusing. |
I have to add a "me too"… we have a CI server running Atlassian's Bamboo, and the user Bamboo is run under has its Docker credentials in
We keep the credentials here because it saves us having to go and set them in each and every Docker task in each and every CI build/deployment job. This, when it works, works fine. Then, mysteriously we see:
It has happened so frequently now… my short term fix is now muscle memory:
From that point, the password works… it's the same password, has not changed, did not change, all I've done is re-enter it into Docker, and Docker has stashed it in the same place as before. I'm a little miffed at this. It's not as though this is a token generated by the Docker Hub server that's then stashed… it's just the username and password, separated by a colon then mashed into a Base64 blob! There's literally nothing to expire. We don't change the password on Docker hub, we don't change anything on the CI server. Yet, mysteriously, this suddenly becomes the "wrong" password. We've had the problem for months, with literally no changes to our configuration. A few weeks back, I tried updating Docker just to see if that cured the bug, we now run:
No dice… we STILL get the problem… and I'm getting a little tired of my now every-few-daily ritual. |
my problem was caused by the host clock. |
I've seen the same issue and it was also caused by the wrong time in my VM. The VM did not have automatic time sync with the host, so "docker push" worked fine right after boot (because time was correct) and stopped working after the pause/resume of the VM. It was not obvious to me why I got different results. Unfortunately, docker does not perform the check before the upload of the image and fails after it has uploaded data. It was 4GB in my case. Logs also do not help. |
@seanjensengrey This worked for me :) Thanks |
I'm also facing this issue, and like @phistakis and @nongdenchet it seems to be a product of the image size. I can build/push a small image without problem. I then try a larger image (~7GB), and after "pushing" everything, I then get If this is related to the image size, then the error message is wildly unhelpful. I wonder if, given the number of responses here that address the host machine's time as a potential culprit, the amount of time it takes to push the images is causing a conflict. |
In case anyone finds this thread, if you are using aks and pushing your image to your azure container registry. You will get the authentication error but it is NOT related to docker. |
Thank you. |
I am facing a similar issue. When I try to push a smaller image (120MB), it goes through perfectly. But when I try to push a larger image(400MB, which takes around 8-10 min on my LAN speed) , I get this message. 991d64e8c734: Layer already exists I'm certain I have logged in and have the privileges to push to the repo. Docker version: Docker version 19.03.2, build 6a30dfc I even tried some workarounds like having a parallel session issuing 'docker login' every 30s hoping to keep the session active, but no luck. Any help is appreciated. |
@sahanajoshi did you try fixing your system clock like some others have suggested? That did it for me, I was also able to push layers but once it got to the end it failed with |
Hostclock is messy, |
enabling ntp worked for me
|
i had the same issue while pulling some docker images, the problem was at my machine clock |
Repository is this: https://hub.docker.com/r/gtirloni/hellonode
Logout results:
$ docker logout
Remove login credentials for docker.io
Login results:
$ docker login
Username: gtirloni
Password:
Email: [email protected]
WARNING: login credentials saved in /home/user/.docker/config.json
Login Succeeded
Push image error:
$ docker push docker.io/gtirloni/hellonode:latest
Do you really want to push to public registry? [y/n]: y
The push refers to a repository [docker.io/gtirloni/hellonode](len: 1)
521e87320aa7: Preparing
unauthorized: authentication required
Drop "docker.io" from name, push image error
$ docker push gtirloni/hellonode
Do you really want to push to public registry? [y/n]: y
The push refers to a repository [docker.io/gtirloni/hellonode](len: 1)
521e87320aa7: Preparing
unauthorized: authentication required
Push to repository that doesn't exist (to ensure this is not what the unauthorized is trying to tell):
$ docker push docker.io/gtirloni/aaa
Do you really want to push to public registry? [y/n]: y
The push refers to a repository [docker.io/gtirloni/aaa](len: 0)
Repository does not exist: docker.io/gtirloni/aaa
Information:
The text was updated successfully, but these errors were encountered: