[git][curl] "Couldn't connect to server"
Thanks for filing an issue! Please answer the questions below so I can help you.
- iTerm2 version: Build 3.1.6beta4
- OS version: 10.13.4 Build 17E190a
- com.googlecode.iterm2.plist
- debuglog.txt
Detailed steps to reproduce the problem:
- Install latest version of git - 2.16.3
-
brew updatefails - Run git pull where remote uses https.
What happened:
: ; brew update
fatal: unable to access 'https://github.com/Homebrew/brew.git/': Couldn't connect to server
fatal: unable to access 'https://github.com/atomist/homebrew-tap/': Couldn't connect to server
fatal: unable to access 'https://github.com/Homebrew/homebrew-emacs/': Couldn't connect to server
Error: Fetching /usr/local/Homebrew failed!
Fetching /usr/local/Homebrew/Library/Taps/atomist/homebrew-tap failed!
Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-emacs failed!
: ; /usr/local/Homebrew/Library/Taps/homebrew/homebrew-emacs
: ; env GIT_CURL_VERBOSE=1 git pull
* Couldn't find host github.com in the .netrc file; using defaults
* Trying 192.30.253.113...
* TCP_NODELAY set
* Immediate connect fail for 192.30.253.113: Host is down
* Trying 192.30.253.112...
* TCP_NODELAY set
* Immediate connect fail for 192.30.253.112: Host is down
* Closing connection 0
fatal: unable to access 'https://github.com/Homebrew/homebrew-emacs/': Couldn't connect to server
What should have happened:
When same action is done using Terminal:
: ; env GIT_CURL_VERBOSE=1 git pull
env* Couldn't find host github.com in the .netrc file; using defaults
* Trying 192.30.253.113...
* TCP_NODELAY set
* Connected to github.com (192.30.253.113) port 443 (#0)
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: businessCategory=Private Organization; 1.3.6.1.4.1.311.60.2.1.3=US; 1.3.6.1.4.1.311.60.2.1.2=Delaware; serialNumber=5157550; street=88 Colin P Kelly, Jr Street; postalCode=94107; C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=github.com
* start date: Mar 10 00:00:00 2016 GMT
* expire date: May 17 12:00:00 2018 GMT
* subjectAltName: host "github.com" matched cert's "github.com"
* issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 Extended Validation Server CA
* SSL certificate verify ok.
> GET /Homebrew/homebrew-emacs/info/refs?service=git-upload-pack HTTP/1.1
Host: github.com
User-Agent: git/2.16.3
Accept: */*
Accept-Encoding: gzip
Pragma: no-cache
< HTTP/1.1 200 OK
< Server: GitHub Babel 2.0
< Content-Type: application/x-git-upload-pack-advertisement
< Transfer-Encoding: chunked
< Expires: Fri, 01 Jan 1980 00:00:00 GMT
< Pragma: no-cache
< Cache-Control: no-cache, max-age=0, must-revalidate
< Vary: Accept-Encoding
< X-GitHub-Request-Id: EFF9:3520:3CD4045:628CFD0:5AB672E2
< X-Frame-Options: DENY
<
* Connection #0 to host github.com left intact
Already up to date.
This was referenced on Stackoverflow - where problem was solved by installing the latest nightly.
Additional Info:
git:
: ; which git
/usr/local/bin/git
: ; git --version
git version 2.16.3
(venv-3.6.0) ➜ homebrew-emacs git:(master)
: ; brew info git
git: stable 2.16.3 (bottled), HEAD
Distributed revision control system
https://git-scm.com
/usr/local/Cellar/git/2.16.3 (1,497 files, 34.5MB) *
Poured from bottle on 2018-03-24 at 12:23:11
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/git.rb
==> Dependencies
Optional: pcre2 ✘, gettext ✔, openssl ✔, curl ✔, perl ✔
==> Options
--with-blk-sha1
Compile with the block-optimized SHA1 implementation
--with-curl
Use Homebrew's version of cURL library
--with-gettext
Build with gettext support
--with-openssl
Build with Homebrew's OpenSSL instead of using CommonCrypto
--with-pcre2
Build with pcre2 support
--with-perl
Build against Homebrew's Perl rather than system default
--with-persistent-https
Build git-remote-persistent-https from 'contrib' directory
--with-subversion
Use Homebrew's version of SVN
--without-completions
Disable bash/zsh completions from 'contrib' directory
--HEAD
Install HEAD version
==> Caveats
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
zsh completions and functions have been installed to:
/usr/local/share/zsh/site-functions
Emacs Lisp files have been installed to:
/usr/local/share/emacs/site-lisp/git
curl:
(venv-3.6.0) ➜ homebrew-emacs git:(master)
: ; which curl
/usr/bin/curl
(venv-3.6.0) ➜ homebrew-emacs git:(master)
: ; curl --version
curl 7.54.0 (x86_64-apple-darwin17.0) libcurl/7.54.0 LibreSSL/2.0.20 zlib/1.2.11 nghttp2/1.24.0
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz HTTP2 UnixSockets HTTPS-proxy
Edited by R Primus