LoginSignup
2
2

More than 3 years have passed since last update.

dockerfile で git cloneしようとしたらうまくいかなかった件

Last updated at Posted at 2019-11-16

コンテナ内部で

git clone git@github.com:motto1123/mot.git

をした際はうまくいったのに、

RUN git clone git@github.com:motto1123/mot.git

とすると以下のようなエラーが

Cloning into 'motto'...
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
ERROR: Service 'shell' failed to build: The command '/bin/sh -c git clone git@github.com:motto1123/motto.git' returned a non-zero code: 128

ちょっと時間がかかったのですが、結局以下のようにするとOK

RUN git clone https://github.com/motto1123/mot

git@から始まるのでやるとうまくいかないので、httpsで始まる命令にする必要があります。

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