git pull 拉取代码时出现如下错误:
git pull failed
unable to access 'repository url': Recv failure: Connection was reset
解决方法:
git remote remove origin
git remote add origin 你的仓库地址
如果这时候报错,如下所示
Can't Update
No tracked branch configured for branch master or the branch doesn't exist.
To make your branch track a remote branch call, for example,
git branch --set-upstream-to=origin/master master (show balloon)
解决方法:
提示的比较明显了,就是需要本地库和远程分支进行关联;
执行如下命令,使本地库和远程分支进行关联
git branch --set-upstream-to=origin/master master
这时如出现
requested upstream branch 'origin/master' does not exist
但是 origin/master 其实是存在的
解决方法:
先
git pull origin master --allow-unrelated-histories
再使本地库和远程分支进行关联
git branch --set-upstream-to=origin/master master
这里注意是什么分支就改为什么分支,比如你是dev分支,对应的就改为origin/dev dev
git push
解决上述问题就可以,推代码,也可以拉代码了
如果在推代码或者拉代码的时候出现:
fatal: unable to access 你的仓库URL
SSL certificate problem: unable to get local issuer certificate
出现原因:
本地计算机上的SSL证书配置错误引起的,当推送、拉取或者克隆代码的时候,Git无法验证你的SSL证书,从而导致这个错误;
解决方式:
方式一:将Git的SSL证书(SSL certificate)拷贝到Git 安装目录中放置SSL证书(SSL certificate)的位置(推荐)
打开Git安装目录中存放SSL证书的地方,例如:
C:\Program Files\Git\mingw64\ssl\certs\
修改 ca-bundle.crt,把SSL证书(SSL certificate)添加到文件内容的末尾并保存
vi ca-bundle.crt
方式二:关闭SSL认证(不推荐,有安全问题)
git config --global http.sslverify false --命令的影响范围是系统当前用户
git config --system http.sslverify false --命令的影响范围是全局所有用户
参考:
【git】idea使用update提示Can't Update No tracked branch configured for branch master or the branch doe..._System.out.print的博客-CSDN博客1、看右下角的提示信息2、其实已经提示了To make your branch track a remote branch call //需要 本地和远程分支关联3、提示中已经给出了例子:git branch --set-upstream-to=origin/分支名4、解决,我的分支是在origin/master。于是如下:打开git命令窗口输入:gi...https://blog.csdn.net/weixin_40841731/article/details/103875860解决"requested upstream branch 'origin/master' does not exist"_jack22001的博客-CSDN博客问题:1、本地初始化了git仓库,放了一些文件进去并进行了add操作和commit提交操作;2、github创建了git仓库并建立了README,.gitignore等文件;3、本地仓库添加了github上的git仓库作为远程仓库,起名origin; git remote add origin 远程仓库地址4,本地仓库也远程仓库关联git branch ...https://blog.csdn.net/jack22001/article/details/87946037SSL cerfrificaion problem: 'unable to get local issuer certificate' | KomodorThe 'unable to get local issuer certificate' is a common SSL error faced by devs trying to push, pull, or clone a git repository. Lear how it can be fixed.https://komodor.com/learn/how-to-fix-ssl-certificate-problem-unable-to-get-local-issuer-certificate-git-error/Git 克隆仓库报unable to get local issuer certificate错误解决方法 - 授客 - 博客园Git 克隆仓库报unable to get local issuer certificate错误解决方法 By:授客 QQ:1033553122 问题描述 克隆gitlab上的仓库,报错,如下 $ https://www.cnblogs.com/shouke/p/12868316.html