【问题标题】:git push heroku master error: Could not readgit push heroku master 错误:无法读取
【发布时间】:2017-06-02 06:35:52
【问题描述】:

我尝试查看此网站上的一些 git push heroku master 错误,但找不到与我的特定问题相关的错误。希望大家能帮帮我。

当我运行git push heroku master

error: Could not read 6f2abfc273544edc8fa8fbf18837a9ecec606bb2
fatal: bad tree object 6f2abfc273544edc8fa8fbf18837a9ecec606bb2
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
error: failed to push some refs to 'https://git.heroku.com/still-harbor-74893.git'
fatal: write error: Bad file descriptor`

我听说 Heroku 对文件大小设置了硬性限制,这是问题所在吗?

【问题讨论】:

    标签: ruby-on-rails git heroku


    【解决方案1】:

    检查你的 github 文件是否损坏。或者,其中一个文件已损坏。我想不出还有什么可能是这里的问题。

    【讨论】:

    • 很抱歉,如何检查我的文件是否损坏?
    • On branch master. nothing to commit, working tree clean 我不认为有任何损坏?接下来我应该尝试什么?
    • 我认为这是因为大文件/提交大小。所以你可能想减少它,然后再试一次。
    【解决方案2】:

    我猜您的存储库/当前目录已损坏。如果您认为您当前的工作目录包含未损坏的文件,那么您可以随时在您的工作目录中重新初始化 Git。例如:

    rm -rf .git
    git init
    git add .
    git commit -m 'Re-initialize repo.'
    

    然后尝试推送到heroku。

    【讨论】:

    • 我尝试运行你告诉我的命令,但现在我得到了fatal: 'heroku' does not appear to be a git repository fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. 哦,当我与git branch 核对时,我所有的分支都消失了
    猜你喜欢
    • 2013-02-03
    • 2016-12-26
    • 1970-01-01
    • 2016-02-19
    • 2014-07-05
    • 1970-01-01
    • 1970-01-01
    • 2019-10-14
    • 1970-01-01
    相关资源
    最近更新 更多