12
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Netlifyでsubmoduleのcloneに失敗する時

Last updated at Posted at 2019-02-15
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

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

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?