Homebrew / homebrew-core

🍻 Default formulae for the missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
13.77k stars 12.45k forks source link

an error on brew search #2410

Closed hainuo closed 8 years ago

hainuo commented 8 years ago

-> % brew search mdbtools mdbtools ✔ /usr/local/Library/Homebrew/utils/github.rb:200:in raise_api_error': GitHub::Error from /usr/local/Library/Homebrew/utils/github.rb:162:inopen' from /usr/local/Library/Homebrew/cmd/search.rb:133:in block in search_tap' from /usr/local/Library/Homebrew/cmd/search.rb:150:inyield' from /usr/local/Library/Homebrew/cmd/search.rb:150:in search_tap' from /usr/local/Library/Homebrew/cmd/search.rb:117:inblock (2 levels) in search_taps'

the osX version is 10.11.6 beta image

DomT4 commented 8 years ago

Does this reproduce consistently or was it a one-time issue?

hainuo commented 8 years ago

just when i run this command ------------------ 原始邮件 ------------------ 发件人: "Dominyk Tiller"notifications@github.com 发送时间: 2016年6月29日(星期三) 中午11:22 收件人: "Homebrew/homebrew-core"homebrew-core@noreply.github.com; 抄送: "hainuo"admin@hainuo.info;"Author"author@noreply.github.com; 主题: Re: [Homebrew/homebrew-core] an error on brew search (#2410)

Does this reproduce consistently or was it a one-time issue?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

ilovezfs commented 8 years ago

Is this still happening? Perhaps a transient issue with the GitHub API?

hainuo commented 8 years ago

it sames allway. @ilovezfs i don't konw.

-> % brew search php70
homebrew/php/php70 ✔                     homebrew/php/php70-mongodb
homebrew/php/php70-amqp                  homebrew/php/php70-msgpack
homebrew/php/php70-apcu                  homebrew/php/php70-mustache
homebrew/php/php70-apcu-bc               homebrew/php/php70-oauth
homebrew/php/php70-ast                   homebrew/php/php70-opcache
homebrew/php/php70-blitz                 homebrew/php/php70-pcntl
homebrew/php/php70-ev                    homebrew/php/php70-pdo-dblib
homebrew/php/php70-event                 homebrew/php/php70-pdo-pgsql
homebrew/php/php70-gmagick               homebrew/php/php70-pspell
homebrew/php/php70-gmp                   homebrew/php/php70-pthreads
homebrew/php/php70-hprose                homebrew/php/php70-rdkafka
homebrew/php/php70-igbinary              homebrew/php/php70-redis ✔
homebrew/php/php70-imagick ✔             homebrew/php/php70-snmp
homebrew/php/php70-intl ✔                homebrew/php/php70-ssh2
homebrew/php/php70-kafka                 homebrew/php/php70-stats
homebrew/php/php70-libsodium             homebrew/php/php70-swoole ✔
homebrew/php/php70-lz4                   homebrew/php/php70-tidy
homebrew/php/php70-lzf                   homebrew/php/php70-timecop
homebrew/php/php70-mailparse             homebrew/php/php70-uuid
homebrew/php/php70-maxminddb             homebrew/php/php70-v8js
homebrew/php/php70-mcrypt ✔              homebrew/php/php70-xdebug ✔
homebrew/php/php70-mecab                 homebrew/php/php70-xxtea
homebrew/php/php70-memcached             homebrew/php/php70-yaml
/usr/local/Library/Homebrew/utils/github.rb:200:in `raise_api_error': GitHub::Error
    from /usr/local/Library/Homebrew/utils/github.rb:162:in `open'
    from /usr/local/Library/Homebrew/cmd/search.rb:133:in `block in search_tap'
    from /usr/local/Library/Homebrew/cmd/search.rb:150:in `yield'
    from /usr/local/Library/Homebrew/cmd/search.rb:150:in `search_tap'
    from /usr/local/Library/Homebrew/cmd/search.rb:117:in `block (2 levels) in search_taps'
ilovezfs commented 8 years ago

cd /usr/local git status git remote show origin brew config

hainuo commented 8 years ago
-> % git status
On branch master
nothing to commit, working directory clean
-> % git remote show origin
* remote origin
  Fetch URL: https://github.com/Homebrew/brew.git
  Push  URL: https://github.com/Homebrew/brew.git
  HEAD branch: master
  Remote branch:
    master tracked
  Local ref configured for 'git push':
    master pushes to master (up to date)

-> % brew config
HOMEBREW_VERSION: 0.9.9
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: 3e309d4643ab52ce823b8733d72f8665133dbf5e
Last commit: 7 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 869566abed393a299baf251cc81bfe59e707e282
Core tap last commit: 5 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
Clang: 7.3 build 703
Git: 2.9.0 => /usr/local/bin/git
Perl: /usr/local/bin/perl => /usr/local/Cellar/perl/5.24.0_1/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/local/bin/ruby => /usr/local/Cellar/ruby/2.3.1/bin/ruby
Java: 1.8.0_51, 1.6.0_65-b14-468
System Ruby: 2.0.0-p648
OS X: 10.11.6-x86_64
Xcode: 7.3.1
CLT: 7.3.1.0.1.1461711523
X11: N/A
ilovezfs commented 8 years ago

mkdir ~/Documents/taps20160630 mv /usr/local/Library/Taps ~/Documents/taps20160630 brew tap homebrew/core

Then try search again

hainuo commented 8 years ago
-> % brew search php70
No formula found for "php70".
==> Searching pull requests...
/usr/local/Library/Homebrew/utils/github.rb:200:in `raise_api_error': GitHub::Error
    from /usr/local/Library/Homebrew/utils/github.rb:162:in `open'
    from /usr/local/Library/Homebrew/cmd/search.rb:133:in `block in search_tap'
    from /usr/local/Library/Homebrew/cmd/search.rb:150:in `yield'
    from /usr/local/Library/Homebrew/cmd/search.rb:150:in `search_tap'
    from /usr/local/Library/Homebrew/cmd/search.rb:117:in `block (2 levels) in search_taps'
hainuo commented 8 years ago

it takes too many time,so lately i replyed

ilovezfs commented 8 years ago

Sounds like a network issue. Are you behind a proxy server or firewall or vpn etc.?

hainuo commented 8 years ago

copy that,i launch lantern for crossthe wall。eating now ,i'll turn off lantern & retry soon ------------------ 原始邮件 ------------------ 发件人: "ilovezfs"notifications@github.com 发送时间: 2016年7月1日(星期五) 中午12:19 收件人: "Homebrew/homebrew-core"homebrew-core@noreply.github.com; 抄送: "hainuo"admin@hainuo.info;"Author"author@noreply.github.com; 主题: Re: [Homebrew/homebrew-core] an error on brew search (#2410)

Sounds like a network issue. Are you behind a proxy server or firewall or vpn etc.?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

MikeMcQuaid commented 8 years ago

@ilovezfs We/I can definitely improve the error messaging here, it's pretty dire 😭

ilovezfs commented 8 years ago

yeah hehe. let's see if the diagnosis is correct

hainuo commented 8 years ago

it is always like this

fengliu@fengdeMacBook-Air [13时44分33秒] [~]
-> % brew search mdbtools
mdbtools ✔
/usr/local/Library/Homebrew/utils/github.rb:200:in `raise_api_error': GitHub::Error
    from /usr/local/Library/Homebrew/utils/github.rb:162:in `open'
    from /usr/local/Library/Homebrew/cmd/search.rb:133:in `block in search_tap'
    from /usr/local/Library/Homebrew/cmd/search.rb:150:in `yield'
    from /usr/local/Library/Homebrew/cmd/search.rb:150:in `search_tap'
    from /usr/local/Library/Homebrew/cmd/search.rb:117:in `block (2 levels) in search_taps'
fengliu@fengdeMacBook-Air [13时45分57秒] [~]
ilovezfs commented 8 years ago

Does it go away with "lantern" turned off?

hainuo commented 8 years ago

@ilovezfs yes

ilovezfs commented 8 years ago

Try turning lantern back on, and then

brew search php70
brew search mdbtools
export HOMEBREW_NO_GITHUB_API=1
brew search php70
brew search mdbtools

and post what you get, please.

hainuo commented 8 years ago
-> % brew search mdbtools
mdbtools ✔
/usr/local/Library/Homebrew/utils/github.rb:200:in `raise_api_error': GitHub::Error
    from /usr/local/Library/Homebrew/utils/github.rb:162:in `open'
    from /usr/local/Library/Homebrew/cmd/search.rb:133:in `block in search_tap'
    from /usr/local/Library/Homebrew/cmd/search.rb:150:in `yield'
    from /usr/local/Library/Homebrew/cmd/search.rb:150:in `search_tap'
    from /usr/local/Library/Homebrew/cmd/search.rb:117:in `block (2 levels) in search_taps'
fengliu@fengdeMacBook-Air [16时42分02秒] [~]
-> % brew search php70
homebrew/php/php70-amqp                  homebrew/php/php70-msgpack
homebrew/php/php70-apcu-bc               homebrew/php/php70-mustache
homebrew/php/php70-apcu                  homebrew/php/php70-oauth
homebrew/php/php70-ast                   homebrew/php/php70-opcache
homebrew/php/php70-blitz                 homebrew/php/php70-pcntl
homebrew/php/php70-ev                    homebrew/php/php70-pdo-dblib
homebrew/php/php70-event                 homebrew/php/php70-pdo-pgsql
homebrew/php/php70-gmagick               homebrew/php/php70-pspell
homebrew/php/php70-gmp                   homebrew/php/php70-pthreads
homebrew/php/php70-hprose                homebrew/php/php70-rdkafka
homebrew/php/php70-igbinary              homebrew/php/php70-redis
homebrew/php/php70-imagick               homebrew/php/php70-snmp
homebrew/php/php70-intl                  homebrew/php/php70-ssh2
homebrew/php/php70-kafka                 homebrew/php/php70-stats
homebrew/php/php70-libsodium             homebrew/php/php70-swoole
homebrew/php/php70-lz4                   homebrew/php/php70-tidy
homebrew/php/php70-lzf                   homebrew/php/php70-timecop
homebrew/php/php70-mailparse             homebrew/php/php70-uuid
homebrew/php/php70-maxminddb             homebrew/php/php70-v8js
homebrew/php/php70-mcrypt                homebrew/php/php70-xdebug
homebrew/php/php70-mecab                 homebrew/php/php70-xxtea
homebrew/php/php70-memcached             homebrew/php/php70-yaml
homebrew/php/php70-mongodb               homebrew/php/php70
/usr/local/Library/Homebrew/utils/github.rb:200:in `raise_api_error': GitHub::Error
    from /usr/local/Library/Homebrew/utils/github.rb:162:in `open'
    from /usr/local/Library/Homebrew/cmd/search.rb:133:in `block in search_tap'
    from /usr/local/Library/Homebrew/cmd/search.rb:150:in `yield'
    from /usr/local/Library/Homebrew/cmd/search.rb:150:in `search_tap'
    from /usr/local/Library/Homebrew/cmd/search.rb:117:in `block (2 levels) in search_taps'
fengliu@fengdeMacBook-Air [16时43分47秒] [~]
-> % export HOMEBREW_NO_GITHUB_API=1
fengliu@fengdeMacBook-Air [16时48分11秒] [~]
-> % brew search mdbtools
mdbtools ✔
fengliu@fengdeMacBook-Air [16时48分17秒] [~]
-> % brew search php70
No formula found for "php70".
fengliu@fengdeMacBook-Air [16时48分24秒] [~]
-> %
ilovezfs commented 8 years ago

@MikeMcQuaid That looks like a "bug" to me that despite the API error, the search results for php70 were better when HOMEBREW_NO_GITHUB_API was unset. I'd think the results would be just as good with HOMEBREW_NO_GITHUB_API=1, except no API error, but apparently not.

hainuo commented 8 years ago

thanks for your patience。

MikeMcQuaid commented 8 years ago

Opened a PR to improve the messaging in https://github.com/Homebrew/brew/issues/441

ilovezfs commented 8 years ago

@MikeMcQuaid With https://github.com/Homebrew/brew/pull/441 merged, I suppose this can be closed now?

MikeMcQuaid commented 8 years ago

Yep.