git经验贴

2017-06-06

本博客所有文章采用的授权方式为 自由转载-非商用-非衍生-保持署名 ,转载请务必注明出处,谢谢。

声明:
本博客欢迎转发,但请保留原作者信息!
博客地址:王超的博客;
内容系本人学习、研究和总结,如有雷同,实属荣幸!

1.在Ubuntu下使用$ git clone时出现server certificate verification failed. CAfile:/etc/ssl/certs/ca-certificates.crt CRLfile: none

 解决方法:在执行$ git clone 之前,在终端输入: export GIT_SSL_NO_VERIFY=1

2.在vpn环境下,使用git下载https项目时,出现了GnuTLS recv error (-9): A TLS packet with unexpected length was received

解决方法: ifconfig eth0 mtu 1400 GIT_CURL_VERBOSE=1 apt-get install stunnel4

3.从 github 执行 git clone 一个大的项目时提示 error: RPC failed

解决方法:git config http.postBuffer 524288000 To set this gloablly for all remote Git repositories you ever connect to 或者 git config –global http.postBuffer 524288000 另外低版本的git也可能存在此问题, ubuntu下git升级方法如下: add-apt-repository ppa:git-core/ppaapt-get updateapt-get dist-upgrade

4. git clone 出现fatal: unable to access SSL certificate problem: unable to get local issuer certificate

解决方法:git config –global http.sslVerify false

5. 如何从fork库同步远程分支代码

$ git remote add upstream 远程库地址
$ git remote -v  //确认是否增加成功
$ git fetch upstream  //从远程库同步代码
$ git merge upstream/SQLite //Merge对应的分支进来

文章评论

comments powered by Disqus


章节列表