LoginSignup
2
0

More than 3 years have passed since last update.

Dockerhubで「fatal: Could not read from remote repository」が出る場合はgit repository(github)でssh-keyを登録する

Last updated at Posted at 2019-06-24

事象

dockerhubでbuildを行ったら以下のエラー発生。

Building in Docker Cloud's infrastructure...
Cloning into '.'...
Warning: Permanently added the RSA host key for IP address '192.30.253.112' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
please ensure the correct public key is added to the list of trusted keys for this repository (128)

対処

dockerhubのsshkeyを取得

git repository(github)でssh-keyを登録する
下記のdeploy keyをコピー
image.png

githubへsshkeyを登録

https://github.com/settings/keys
からadd newしてsshkeyを登録
image.png

Build再実行

成功を確認
image.png

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