Heroku推送被拒绝,Submodule安装失败

Jef*_*y K 11 git heroku git-submodules

我的repo使用了Recurly-js的自定义版本,我使用这些说明https://devcenter.heroku.com/articles/git-submodules将其打包为子模块.但是,当我尝试部署时,我现在收到以下错误:

----> Heroku receiving push 
-----> Git submodules detected, installing
       Submodule 'recurly-js' (/app/tmp/repo.git/recurly-js) registered for path 'recurly-js'
       Initialized empty Git repository in /tmp/build_3iacvn8h2rnha/recurly-js/.git/
       fatal: '/app/tmp/repo.git/recurly-js' does not appear to be a git repository
       fatal: The remote end hung up unexpectedly
       Clone of '/app/tmp/repo.git/recurly-js' into submodule path 'recurly-js' failed
 !     Heroku push rejected, Submodule install failed
Run Code Online (Sandbox Code Playgroud)

Yan*_*nin 15

作为对@ jeffrey-k的答案的评论,我给出了答案,但现在我更加确定了,我会在这里写.

我的回购突然停止推动,这两件事"固定"了它:

  1. 将所有公共子模块URL(如果有)从使用ssh传输URL更改为只读git传输URL(即从,git@github.com:yaniv-aknin/public-projectgit://github.com/yaniv-aknin/public-project).为此,您需要编辑在.gitmodulesrepo的根目录中调用的文件.
  2. 从我的repo中删除所有私有子模块(如果有的话)(从它们.gitmodulesrm -fr目录中删除它们).
  3. 提交更改.

这会处理这两种行为变化:

  1. Heroku曾经能够使用ssh传输从github克隆子模块(可能他们有一些'一般的heroku ssh密钥'和github帐户,但不确定).
  2. Heroku过去常常忽略失败的子模块,只是继续推送.

我打开了一张票,询问我的分析是否正确以及为什么会发生变化(我没有听到任何警告) - 如果我学到了新的东西,我会更新这个答案.

更新:来自Heroku的诺亚的支持回复了我的机票,并在很大程度上承认了我上面所说的内容.应更改公共回购网址,应删除私有回购或根据文档在其中嵌入凭据; 后一种解决方案具有明显的安全后果.