Skip to content
This repository was archived by the owner on Jan 16, 2025. It is now read-only.
This repository was archived by the owner on Jan 16, 2025. It is now read-only.

Running brew update fails with SSL error #46590

Closed
@blackrobot

Description

@blackrobot

This issue has only started occurring in the past month or two, and I can't figure out what's causing it.

When I run brew update, about 60% of the time, it will fail with an SSLRead() return error -9806. Other times, it will successfully complete the update.

brew config

HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: 5171f2a0b280fa8675f23f67ba85b99810d1cc44
Last commit: 26 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: quad-core 64-bit haswell
OS X: 10.10.5-x86_64
Xcode: 7.1.1
CLT: 7.1.0.0.1.1444952191
Clang: 7.0 build 700
X11: 2.7.8 => /opt/X11
System Ruby: 2.0.0-p481
Perl: /usr/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Java: 1.8.0_60, 1.8.0_31

brew doctor

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
    /usr/local/include/python3.5m/greenlet/greenlet.h

Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
    vim

Warning: Your Homebrew is outdated.
You haven't updated for at least 24 hours. This is a long time in brewland!
To update Homebrew, run `brew update`.

Regardless of the value of GIT_SSL_NO_VERIFY, the same error occurs. Here is the output of running the brew update --verbose command itself:

brew update --verbose

==> git symbolic-ref --short HEAD 2>/dev/null
master
==> git rev-parse -q --verify HEAD
5171f2a0b280fa8675f23f67ba85b99810d1cc44
git config core.autocrlf false
git pull --ff --no-rebase origin refs/heads/master:refs/remotes/origin/master
fatal: unable to access 'https://github.com/Homebrew/homebrew/': SSLRead() return error -9806
Error: Failure while executing: git pull --ff --no-rebase origin refs/heads/master:refs/remotes/origin/master

Activity

DomT4

DomT4 commented on Dec 2, 2015

@DomT4
Contributor
  • Are there any proxy settings being passed in your ~/.gitconfig?
  • Do you have any sslCAinfo variable set in your ~/.gitconfig?
  • Do you have a SSL_CERT_FILE env set?
  • What git are you using? Ours or the system's?
blackrobot

blackrobot commented on Dec 2, 2015

@blackrobot
Author

@DomT4 There aren't any proxy settings, or sslCAinfo changes as far as I can tell, but I've posted the full file here in case I'm missing something: https://gist.github.com/blackrobot/3b1c43fefd103e1ab20d

Do you have a SSL_CERT_FILE env set?

It is not set.

What git are you using? Ours or the system's?

I'm using the Homebrew version of git. I've also tried installing curl with openssl, and re-installing git with the --with-brewed-curl and --with-brewed-openssl flags.

DomT4

DomT4 commented on Dec 2, 2015

@DomT4
Contributor

Can't see anything in the .gitconfig that would change anything significant to being able to pull. Can you try brew rm git and then run brew update again? Will help us narrow it down a bit further.

blackrobot

blackrobot commented on Dec 2, 2015

@blackrobot
Author

After removing git, I still get an SSLRead() error, but with a new error code: 36. I'm not sure if it's relevant, but it took just under 10 minutes from entering the brew update command to receiving the error. I didn't time the previous runs, but they seemed to stall for about the same amount of time.

$ brew rm git
Uninstalling /usr/local/Cellar/git/2.6.3... (1412 files, 36M)

$ brew update --verbose
==> git symbolic-ref --short HEAD 2>/dev/null
master
==> git rev-parse -q --verify HEAD
7bc02bb6338b09d165191fc4e94b5d5ad4c78a9a
git config core.autocrlf false
git pull --ff --no-rebase origin refs/heads/master:refs/remotes/origin/master
fatal: unable to access 'https://github.com/Homebrew/homebrew/': SSLRead() return error -36
Error: Failure while executing: git pull --ff --no-rebase origin refs/heads/master:refs/remotes/origin/master
MikeMcQuaid

MikeMcQuaid commented on Dec 4, 2015

@MikeMcQuaid
Member

What country are you in, out of interest? Can you manually git clone https://github.com/Homebrew/homebrew/? How about git://github.com/Homebrew/homebrew/?

blackrobot

blackrobot commented on Dec 4, 2015

@blackrobot
Author

What country are you in, out of interest?

🇺🇸 USA, in Brooklyn New York.

Can you manually git clone https://github.com/Homebrew/homebrew/? How about git://github.com/Homebrew/homebrew/?

I can manually clone both, and I've never had issues using git and github directly with my own projects. But, right now brew update is behaving normally–as it does intermittently. Later today, I'll try brew update again, and if it fails, I'll immediately try the git clone operations again.

MikeMcQuaid

MikeMcQuaid commented on Dec 4, 2015

@MikeMcQuaid
Member

Sounds like it could be a random connectivity/ISP issue. Not much more we can do to help debug here, sorry. Might be better reaching out to GitHub Support in future.

locked and limited conversation to collaborators on Jul 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @blackrobot@MikeMcQuaid@DomT4

        Issue actions

          Running brew update fails with SSL error · Issue #46590 · Homebrew/legacy-homebrew