从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网址(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
更新
以下是traceroute结果:
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 *
更新
sudo
,那么所有Git命令都可以正常工作。sudo
命令的iTerm中遇到问题答案 0 :(得分:2)
我的问题只有
iTerm
我没有问题(即使没有sudo
)与标准控制台应用程序
显然,这是一个过时的iTerm
version案例。使用iTerm2
可能效果更好,但OP补充说:
我已经下载了
iTerm
的每晚版本,一切正常!