LoginSignup
0
0

More than 1 year has passed since last update.

Dockerで「Error saving credentials: error storing credentials...」出た時の対処

Posted at

WSL2上のUbuntu 20.04において

aws ecr get-login-password --region ap-northeast-1 | docker login --username AWS --password-stdin <id>.dkr.ecr.ap-northeast-1.amazonaws.com

を実行した時に、以下のようなエラーが出た。

Error saving credentials: error storing credentials - err: exit status 1, out: `Post "http://ipc/registry/credstore-updated": open \\.\pipe\dockerBackendApiServer: The system cannot find the file specified.`

ググると ~/.docker/config.json"credsStore": "desktop.exe" を削除すればよいという記事がいくつかヒットしたのでやってみると、たしかにログインは通るのだが、以下のような警告が出る。

WARNING! Your password will be stored unencrypted in /home/marukaz/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

実際に config.json を改めて確認するとcredentialが平文で書き込まれてしまっている。

ここで改めて "credsStore": "desktop.exe" という文字列を見て気づいたのだが、Docker Desktopが起動していないだけだった…。
Docker Desktopを起動し、~/.docker/config.json に書き込まれてしまったcredentialを削除してもう一度冒頭のコマンドを実行したところ、無事ログインできた。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0