Docker login not possible on remote Mac (Error saving credentials)

When I try to docker login on macOS at the remote destination (ssh connection destination), I get an error.

$ docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username: keinos
Password: 
Error saving credentials: error storing credentials - err: exit status 1, out: `error storing credentials - err: exit status 1, out: `User interaction is not allowed.``

Guguru with "I can't log in to mac docker" didn't come up with an article about Don Pisha, so as my own googleability.

TS; DR

"Keychain access" is locked (access restricted).

Check the remote destination with screen sharing, or unlock it with the following command.

Keychain access release command (password required)


security unlock-keychain

TL; DR

macOS has a standard application called "Keychain Access" that centrally manages information such as passwords, public keys, and private keys. iCloud syncs, so passwords stored in different environments will be synced with the same Apple ID.

--Reference: How to randomly generate a password with standard macOS functions @ Qiita

While it has the convenience of 1password, it has various operational issues for security reasons.

One of them is that any OS or app updates that require Keychain access permission may ** restrict some remote controls until the user approves.

Especially when a security-oriented application such as docker login that stores password information in Keychain Access and uses it is displaying some kind of popup at the remote destination.

$ #Locked pattern
$ docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username: keinos
Password: ******
Error saving credentials: error storing credentials - err: exit status 1, out: `error storing credentials - err: exit status 1, out: `User interaction is not allowed.``

$ #unlock
$ security unlock-keychain
password to unlock default: ******

$ docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username: keinos
Password: ******
Login Succeeded

In my case, the remote macOS was HighSierra (OSX 10.13.6), so I was scolded that I couldn't use it even though I had the latest version of Docker. Even with this popup displayed, you can proceed by running security unlock-keychain.

Docker_OSX_10.13_is_not_supported.png

References

-What to do if you can't log in with "Share screen" on macOS but can connect via SSH @ Qiita

Recommended Posts

Docker login not possible on remote Mac (Error saving credentials)
[Docker for Mac] Deal with Credentials store error
Steps to run docker on Mac
Try using Redmine on Mac docker
JMeter Client/Server Remote Testing on Docker
Use Docker on your M1 Mac
Customize OpenFOAM v8 Docker Image on Mac
Run Ubuntu + ROS with Docker on Mac