解决git无法clone提示443以及配置git代理方法

Cloning into '/Users/DanFrey/Library/Caches/Homebrew/go--gotools--git'...
fatal: unable to access 'https://go.googlesource.com/tools.git/': Failed to connect to go.googlesource.com port 443: Operation timed out
Error: An exception occurred within a child process:
DownloadError: Failed to download resource "go--gotools"
Failure while executing; `git clone --branch release-branch.go1.13 https://go.googlesource.com/tools.git /Users/DanFrey/Library/Caches/Homebrew/go--gotools--git` exited with 128. Here's the output:
Cloning into '/Users/DanFrey/Library/Caches/Homebrew/go--gotools--git'...
fatal: unable to access 'https://go.googlesource.com/tools.git/': Failed to connect to go.googlesource.com port 443: Operation timed out

 

解决方案(在有FQ的情况下):

git config --global http.proxy "localhost:1080"

如需要取消:

git config --global --unset http.proxy

posted @ 2020-02-20 09:40  DF的翱翔  阅读(5717)  评论(0)    收藏  举报