Heroku 推送被拒绝,子模块安装失败 [英] Heroku push rejected, Submodule install failed

查看:27
本文介绍了Heroku 推送被拒绝,子模块安装失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

推荐答案

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

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.

我的 repo 突然停止推送,这两件事修复"了它:

My repo suddenly stopped pushing, and these two things 'fixed' it:

  1. 将所有公共子模块 URL(如果有)从使用 ssh 传输 URL 更改为只读 git 传输 URL(即,从 git@github.com:yaniv-aknin/public-project>git://github.com/yaniv-aknin/public-project).为此,您需要编辑存储库根目录中名为 .gitmodules 的文件.
  2. 从我的存储库中删除所有私有子模块(如果有)(从 .gitmodulesrm -fr 目录中删除它们).
  3. 提交更改.
  1. 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). To do this, you will need to edit the file called .gitmodules in the root of your repo.
  2. Remove all private submodules (if any) from my repo (remove them from .gitmodules and rm -fr their directories).
  3. Commit the changes.

这处理了这两个行为变化:

This handles these two changes in behaviour:

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

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

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.

更新:来自 Heroku 支持的 Noah 回复了我的请求,并且在很大程度上承认了我上面所说的.公共存储库 URL 应该更改,私有存储库应该根据 这个 文件;后一种解决方案具有明显的安全后果.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆