Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

docker login - error storing credentials - write permissions error

Tags:

docker

I am running a docker login command as a part of the Bamboo build job. The command text is obtained by aws ecr get-login call and executed in a subshell.

This command fails with Error saving credentials: error storing credentials - err: exit status 1, out: write permissions error when ran as a part of the Bamboo build, but the exact same command ran in the Terminal on the Mac that is the build agent, it succeeds.

Using Terminal:

  • aws ecr get-login succeeds and returns the docker login command text
  • docker login -u ... -p ... -e none ... succeeds and logs in
  • There is a record for the ECR URL in KeyChain
  • There is an entry in ~/.docker/config.json

Using Bamboo:

  • aws ecr get-login succeeds and returns the docker login command text
  • docker login -u ... -p ... -e none ... fails with the error above
  • KeyChain record being made available to all applications makes no difference'
  • chmod 777 ~/.docker/config.json makes no difference

Both the Bamboo build and the Terminal session happen under the same user - builduser. whoami is the same for both. stat ~/.docker/config.json is the same for both - writable for both.

Can you think of further ways of discovering the differences between the context Bamboo runs the build in and I do in the terminal? The error above, verbatim, related to docker login is nowhere to be found online.

like image 292
Tomáš Hübelbauer Avatar asked Mar 14 '17 13:03

Tomáš Hübelbauer


People also ask

How to fix Docker permission denied in Linux?

Fix 1: Run all the docker commands with sudo. If you have sudo access on your system, you may run each docker command with sudo and you won’t see this ‘Got permission denied while trying to connect to the Docker daemon socket’ anymore. But running each and every docker command with sudo is super inconvenient.

What happens if Docker cannot find the password?

A special case is that on Linux, Docker will fall back to the “secretservice” binary if it cannot find the “pass” binary. If none of these binaries are present, it stores the credentials (i.e. password) in base64 encoding in the config files described above.

What is error getting credentials-err exit status 1?

docker login returns "error getting credentials - err: exit status 1 ..." #60 The docker login command is returning the following error for two users out of three users on the same physical host using docker-credential-secretservice Release v0.5.0. The user that can login to docker hub does not have any issue pushing or pulling.

How to remove Docker-credential-osxkeychain from Docker Hub?

Simply remove docker-credential-osxkeychain file present in /usr/local/bin/ directory. I renamed that file and it worked. Login with your Docker ID to push and pull images from Docker Hub.


1 Answers

I had to remove my existing config.json file. It would not overwrite or modify the one that I had.

like image 176
Mike Nishizawa Avatar answered Nov 02 '22 05:11

Mike Nishizawa



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!