git - Homebrew 软件安装错误在 : git fetch origin master:refs/remotes/origin/master --tags --force 期间失败

标签 git homebrew macos-big-sur

我无法安装 Homebrew 软件。
我试过的方法:

  • 更改 http_proxy 值 `导出http_proxy=http://127.0.0.1:10818;导出https_proxy=http://127.0.0.1:10818;
  • 提高 postBuffer 值 git config --global http.postBuffer 5242880000
  • 更改脚本 使用 ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"而不是 /usr/bin/ruby -e "$(curl -fsSL... 有效。谁能解释为什么它有效?感谢

  • 终端不断显示此消息
    ==> Downloading and installing Homebrew...
    remote: Enumerating objects: 22, done.
    remote: Counting objects: 100% (22/22), done.
    remote: Compressing objects: 100% (16/16), done.
    error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 60
    fatal: the remote end hung up unexpectedly
    fatal: early EOF
    fatal: index-pack failed
    Failed during: git fetch origin master:refs/remotes/origin/master --tags --force
    

    最佳答案

    我遇到了同样的问题,我认为我们有同样的问题,当我安装 homebrew/core 时它总是中断:

    error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno
    54 fatal: the remote end hung up unexpectedly fatal: early EOF fatal:
    index-pack failed Failed during: git fetch --force origin
    refs/heads/master:refs/remotes/origin/master
    
    我使用这些资源来解决问题
    Homebrew install: Failed during: git fetch origin master:refs/remotes/origin/master -n --depth=1
    https://www.programmersought.com/article/74365494100/
    我的步骤:
  • 我删除了所有与 Homebrew 相关的文件夹,你会在安装运行开始时找到它们:
    (放入脚本并运行,因为您可能需要多次执行,就像我一样:/)
    ==> 此脚本将安装:
    /usr/local/bin/brew
    /usr/local/share/doc/homebrew
    /usr/local/share/man/man1/brew.1
    /usr/local/share/zsh/site-functions/_brew
    /usr/local/etc/bash_completion.d/brew
    /usr/local/Homebrew
  • 我确保所有网络连接正常,我可以 ping github.com
  • 我确保我的电子邮件已分配给 github 上的帐户
    git config --global user.email yourgitemail@example.com
  • 因为你确实增加了后缓冲值
    git 配置 --global http.postBuffer 5242880000
  • 修改 ssl 传输的安全设置
    git config --globle http.sslVerify "false"

  • 然后一切正常并开始下载。我没有坏,但花了很长时间......我记得离开我的 MacBook Pro 并在很长时间后回来,它仍在转移......我希望我能提供帮助。
    我花了一整天来解决它,但如果您需要更多帮助,这两个链接包含所有详细信息。

    关于git - Homebrew 软件安装错误在 : git fetch origin master:refs/remotes/origin/master --tags --force 期间失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60069083/

    相关文章:

    node.js - fish shell nvm 告诉我 node 和 npm 是 "currently not installed"但它们是

    swift - macOS Big Sur 新的工具栏按钮样式

    git - 无法将 git repo 推送到 Digital Ocean 液滴上的 Dokku 远程?

    linux - 如何取回干净的 git 存储库?

    git - 为什么要在 git clone 之后进行 git checkout?

    git - 如何在 git 中查看被忽略的文件列表?

    php - 使用 Homebrew 软件在 MAC 上安装 PHP 和 Postgresql

    python - 由于 polyfit 错误,macOS Big Sur python3 无法导入 numpy

    python - OS X - 在 anaconda 和 Homebrew Python 环境之间做出决定

    java - 在 mac OS 上通过 Homebrew 软件安装 elasticsearch 时将节点添加到集群?