Git-fatal: unable to access ‘https://gitlab.XX.git/‘: Could not resolve host: gitlab.XX.com.cn

天官赐福 / 2023-05-24 / 原文

git提交时报错:
fatal: unable to access 'https://gitlab.XX.git/': Could not resolve host: gitlab.XX.com.cn
此时需要配置代理:
git config --global http.proxy XX.XXX.0.103:8080
取消代理的命令:
git config --global --unset http.proxy