Help us understand the problem. What is going on with this article?

Netlifyでsubmoduleのcloneに失敗する時

More than 1 year has passed since last update.
12:04:27 AM: Error checking out submodules: Submodule 'src/lib/project' (git@github.com:owner/project.git) registered for path 'src/lib/project'
Cloning into '/opt/build/repo/src/lib/project'...
Host key verification failed.

fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@github.com:owner/project.git' into submodule path '/opt/build/repo/src/lib/project' failed
Failed to clone 'src/lib/project'. Retry scheduled
Cloning into '/opt/build/repo/src/lib/project'...
Host key verification failed.

git submoduleを使っていて、Netlify上でこんなエラーが出た時は、下記の様にするとうまくいく。

.gitmodules
[submodule "src/lib/project"]
    path = src/lib/project
-   url = git@github.com:owner/project.git
+   url = git://github.com/owner/project.git

以前にも遭遇して、そのときに何かを参考にして解決したんだと思うけど、忘れちゃいました。公式ドキュメントだったかな?次回すぐに当たれるようにメモ。

naokazuterada
Engineer, Designer, Co-founder of Karappo Inc., Creator of MarkdownTOC https://karappo.net/ https://noracast.jp/ https://podcastfreaks.com/ https://github.com/naokazuterada/MarkdownTOC
http://karappo.net
karappo
ウェブ・インタフェース・グラフィックなどを中心に、デザイン及びコンサルティングを行う会社です。企画からデザイン、実装まで、ワンストップで対応することができます。
https://karappo.net
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away