LoginSignup
7
7

More than 3 years have passed since last update.

docker-composeコマンドでCredentials store errorが出たときの対処法

Last updated at Posted at 2019-06-23

環境

OS: macOS Mojave 10.14.5
Docker DeskTop: 2.0.0.3(Engine: 18.09.2、Compose: 1.23.2、Credential Helper: 0.6.0)

エラーが出たコマンドとエラーメッセージ

$ docker-compose build
Building app # app はdocker-compose.ymlに書かれたサービスの名前
Traceback (most recent call last):
  File "site-packages/dockerpycreds/store.py", line 74, in _execute
  File "subprocess.py", line 336, in check_output
  File "subprocess.py", line 418, in run
subprocess.CalledProcessError: Command '['/usr/local/bin/docker-credential-osxkeychain', 'get']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "site-packages/docker/auth.py", line 129, in _resolve_authconfig_credstore
  File "site-packages/dockerpycreds/store.py", line 35, in get
  File "site-packages/dockerpycreds/store.py", line 87, in _execute
dockerpycreds.errors.StoreError: Credentials store docker-credential-osxkeychain exited with "The user name or passphrase you entered is not correct.".

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "docker-compose", line 6, in <module>
  File "compose/cli/main.py", line 71, in main
  File "compose/cli/main.py", line 127, in perform_command
  File "compose/cli/main.py", line 287, in build
  File "compose/project.py", line 384, in build
  File "compose/project.py", line 366, in build_service
  File "compose/service.py", line 1082, in build
  File "site-packages/docker/api/build.py", line 251, in build
  File "site-packages/docker/api/build.py", line 307, in _set_auth_headers
  File "site-packages/docker/auth.py", line 96, in resolve_authconfig
  File "site-packages/docker/auth.py", line 146, in _resolve_authconfig_credstore
docker.errors.DockerException: Credentials store error: StoreError('Credentials store docker-credential-osxkeychain exited with "The user name or passphrase you entered is not correct.".',)
[66421] Failed to execute script docker-compose

解決方法

下記を順番に試す。

  1. ターミナルでsecurity unlock-keychainコマンドを実行、キーチェーンのパスワード(デフォルトではMacにログインするときのパスワード)を入力する。成功すると何も表示されない。失敗すると以下のようにエラーメッセージが表示される。
$ security unlock-keychain
password to unlock default: [キーチェーンのパスワード]
security: SecKeychainUnlock <NULL>: The user name or passphrase you entered is not correct.
  1. メニューバーのDockerアイコン > Preferences... > Securely store docker logins in macOS keychain のチェックを外す

  2. Macを再起動する(自分はこれで直った)

参考

Credentials store docker-credential-osxkeychain exited with "User interaction is not allowed." - GitHub

7
7
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
7
7