Heroku推送被拒绝,子模块安装失败 [英] Heroku push rejected, Submodule install failed
问题描述
我的repo使用Recurly-js的自定义版本,并且使用这些说明将它打包为子模块 https://devcenter.heroku.com/articles/git-submodules 。但是,当我尝试部署时,现在出现以下错误:
----> Heroku接收推送
----->检测到Git子模块,安装
子模块'recurly-js'(/app/tmp/repo.git/recurly-js)注册路径'recurly-js'
在/ tmp / build_3iacvn8h2rnha中初始化空的Git存储库/recurly-js/.git/
致命:'/app/tmp/repo.git/recurly-js'似乎不是git存储库
致命:远程端意外挂起
将'/app/tmp/repo.git/recurly-js'克隆到子模块路径'recurly-js'失败
! Heroku push rejected,Submodule install failed
我给出了答案作为对@ jeffrey-k答案的评论,但现在我更加确信它,我会在这里写下它。
我的回购股票突然停止推出,并且这两个东西'固定'它:
- 更改所有公共子模块URL(如果有)使用ssh传输URL到只读git传输URL (即从
git@github.com:yaniv-aknin / public-project
到git://github.com/yaniv-aknin/public -project
)。要做到这一点,你需要编辑你的仓库根目录下的文件.gitmodules
。
- 删除所有私有子模块如果有的话)(将它们从
.gitmodules
和rm -fr
目录中删除)。 - 提交更改。
这会处理这两个行为变化:
- Heroku曾经能够使用ssh transport从github克隆子模块(大概他们有一些'general heroku ssh key'和github账号,但是不确定) li>
- Heroku用于忽略失败的子模块并继续推送。
我打开了一张票询问我的分析是否正确,为什么发生了变化(没有我听到的警告) - 如果我学到了新的东西,我会更新这个答案。
更新:Heroku的支持中的Noah回复了我的机票,并在很大程度上承认了我上面所说的。公共repo网址应该被更改,私有repos应该被删除或者根据这个文件;后者的解决方案具有明显的安全分歧。
My repo uses a customized version of Recurly-js, and I have packaged it as a submodule using these instructions https://devcenter.heroku.com/articles/git-submodules . However, I get the following error now when I try to deploy:
----> 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
I gave the answer as a comment to @jeffrey-k's answer, but now I'm even more sure of it, I'll write it here.
My repo suddenly stopped pushing, and these two things 'fixed' it:
- 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
togit://github.com/yaniv-aknin/public-project
). To do this, you will need to edit the file called.gitmodules
in the root of your repo. - Remove all private submodules (if any) from my repo (remove them from
.gitmodules
andrm -fr
their directories). - Commit the changes.
This handles these two changes in behaviour:
- Heroku used to be able to clone submodules from github using the ssh transport (presumably they had some 'general heroku ssh key' and github account, but not sure).
- Heroku used to ignore failed submodules and just continue the push.
I've opened a ticket asking if my analysis is correct and why did the change happen (with no warning I managed to hear of) - I'll update this answer if I learn something new.
UPDATE: Noah from Heroku's support replied to my ticket and largely acknowledged what I said above. Public repo URLs should be changed, private repos should either be removed or have credentials embedded in them as per this document; the latter solution has obvious security ramifications.
这篇关于Heroku推送被拒绝,子模块安装失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!