//取消http代理
git config --global --unset http.proxy
//取消https代理
git config --global --unset https.proxy
如果用过代理:我这里的代理端口是7890
git config --global http.proxy http://127.0.0.1:7890
git config --global https.proxy http://127.0.0.1:7890
成功解决
参考链接:完美解决 fatal: unable to access 'https://github.com/.../.git': Could not resolve host: github.com-优快云博客