LoginSignup
5
4

More than 5 years have passed since last update.

Submoduleを含んだGitリポジトリをHerokuにアップしようとして(Push rejected, submodule install failed)

Posted at

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

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