1. 解决git clone 连接超时的问题
国内可用的镜像网站有:https://github.com.cnpmjs.org
# 服务器位于香港https://gitclone.com
# 服务器位于杭州https://doc.fastgit.org
# 服务器位于香港
例如:将
git clone https://github.com/XXXXX
修改为
git clone https://gitclone.com/github.com/XXXXX
即可正常下载。
2. 解决下载子模块失败的问题
执行 git submodule update --init --recursive
提示 fatal: unable to connect to github.com:
执行命令:
git config --global url.https://github.com/.insteadOf git://github.com/
即可正常下载子模块。
可使用 vim ~/.gitconfig
(linux)或~/.gitconfig
(windows)命令即可查看gti配置文件。
[filter "lfs"]clean = git-lfs clean -- %fsmudge = git-lfs smudge -- %fprocess = git-lfs filter-processrequired = true
[user]name = xxxemail = xxxx@163.com
[url "https://github.com/"]insteadOf = git://github.com/