今天换了自己电脑搭建开发环境,所以,git需要重新认证:
1.配置用户名+邮箱:
git config --global user.name [username]
git config --global user.email [email]
2.重置用户名+密码
git config --system --unset credential.helper
3.存储用户名+密码
git config --global credential.helper store
git pull
然后就会要求输入用户名(邮箱)+密码,git就会保存了
4.git clone时拼接用户名+密码
//git clone http://username:pwd@remoterUrl
如果username或者pwd中有@或其他特殊符号,需要转义
@的转义是%40
git clone http://1111111%40qq.com:123456@remoteUrl
5.报如下错误时的解决方式:
git.exe push --progress "origin" master:master
Enumerating objects: 33, done.
Counting objects: 100% (33/33), done.
Delta compression using up to 4 threads
Compressing objects: 100% (15/15), done.
Writing objects: 100% (18/18), 1.79 KiB | 612.00 KiB/s, done.
Total 18 (delta 9), reused 0 (delta 0)
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
error: RPC failed; curl 52 Empty reply from server
Everything up-to-date
原因:
文件太大(我也没懂,我的文件并不大)
解决方式:
git config http.postBuffer 524288000
6.报openssl错误时的解决办法
报错信息:
OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
解决办法:
git config --global --unset http.proxy









网友评论