git mac os 来自自制程序:致命:无法访问

git on mac os from homebrew: fatal: unable to access

从 Homebrew 安装 Git 后,我无法使用远程存储库:

$ brew install git
$ git --version
git version 2.3.0
$ git pull
fatal: unable to access 'https://github.com/...': Couldn't connect to server

如果我删除 Homebrew 版本一切正常。

如何使用最新的 git 版本来处理远程存储库?

更新:

我可以使用 SSH 克隆存储库 (git@github.com:...),但是 HTTPS url 有错误 (https://github.com/...)

更新:

$ git config -l

Andrey Demidov, [07.02.15 23:48]
push.default=simple
user.name=Andrey Demidov
user.email=****@gmail.com
mergetool.keepbackup=false
http.sslverify=false
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
core.precomposeunicode=true
remote.origin.url=https://github.com/demas/stackify-node.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master

更新:

$ GIT_CURL_VERBOSE=1 git push

stackify/node » GIT_CURL_VERBOSE=1 git push ‹master›
* Couldn't find host github.com in the .netrc file; using defaults
* Hostname was NOT found in DNS cache
* Trying 192.30.252.130...
* Immediate connect fail for 192.30.252.130: Host is down
* Closing connection 0
fatal: unable to access 'https://github.com/demas/stackify-node.git/': Couldn't connect to server

更新:

这是一个路由跟踪结果:

stackify/node » traceroute github.com ‹master›
traceroute to github.com (192.30.252.130), 64 hops max, 52 byte packets
load: 1.24 cmd: traceroute 34029 waiting 0.00u 0.00s
load: 1.24 cmd: traceroute 34029 waiting 0.00u 0.00s
load: 1.24 cmd: traceroute 34029 waiting 0.00u 0.00s
 1 192.168.1.1 (192.168.1.1) 3.571 ms 3.022 ms 2.565 ms
 2 bras255-lo0.ppos.corbina.net (195.14.38.33) 3.427 ms 4.671 ms 3.899 ms
 3 * * *
 4 ko-crs-be5.corbina.net (195.14.54.184) 23.766 ms 24.413 ms 25.010 ms
 5 tc-bb-ae0.sto.corbina.net (195.14.54.157) 22.168 ms 21.946 ms 22.328 ms
 6 beeline-gw6.bar1.stockholm1.level3.net (213.242.69.13) 22.280 ms
 beeline-gw7.bar1.stockholm1.level3.net (213.242.110.217) 23.015 ms
 beeline-gw1.bar1.stockholm1.level3.net (213.242.110.9) 23.303 ms
 7 ae-3-80.edge3.washington4.level3.net (4.69.149.146) 138.533 ms
 ae-4-90.edge3.washington4.level3.net (4.69.149.210) 150.283 ms *

更新:

I have the problem only with iTerm.
I have no problem (even without sudo) with standard console application

显然,这是一个过时的案例 iTerm version. It might work better with iTerm2,但 OP 补充说:

I have downloaded nightly build of iTerm and all works fine!