git-lfs安装及clone常见问题

1.  安装git for windows-3.20版本,报错Could not find git; can not register Git LFS。

错误原因:可能这个版本有问题。参考:Could not find Git; can not register Git LFS. · Discussion #5031 · git-lfs/git-lfs · GitHub

解决方式:安装Git for Windows 2.36.1

2. 报错fatal: unable to access ‘https://github.com/.......‘: OpenSSL SSL_read: Connection was reset, 

解决方式:解除ssl验证后,再次git即可

git config --global http.sslVerify "false"

3. git clone 速度慢怎么办?

问题:github.com.cnpmjs.org镜像网站用不了,会出现错误:fatal: unable to access 'https://github.com.cnpmjs.org/...': Could not resolve host: github.com.cnpmjs.org

解决方案:控制台输入:git config --global url."https://hub.fastgit.xyz/".insteadOf https://github.com/

然后再git clone。


版权声明:本文为someonelikesyou原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。