Herokuにgit submoduleを含んだリポジトリをプッシュしようとしたら下記のようなエラーが出た。
remote: Git submodules detected, installing:
remote: Submodule '***' (***) registered for path '***'
remote: Cloning into '***'...
remote: Host key verification failed.
remote: fatal: Could not read from remote repository.
remote:
remote: Please make sure you have the correct access rights
remote: and the repository exists.
remote: Clone of '***.git' into submodule path 'public/themes/misoca' failed
remote:
remote: ! Push rejected, submodule install failed
remote:
To https://***
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://***'
解決方法
参考URLにあるようにリポジトリのルートにある.gitsubmodule
を編集してリポジトリの指定の仕方をgit:
ではなくgit://
の形式にしてやれば良い。
Change all public submodule URLs (if any) from using the ssh transport URLs to readonly git transport URLs (i.e., from git@github.com:yaniv-aknin/public-project to git://github.com/yaniv-aknin/public-project
参考
git - Heroku push rejected, Submodule install failed - Stack Overflow