目录
- 克隆远程仓库时报错信息
- 前情报错
- 删掉本地克隆的仓库,重新克隆
- push出错 fatal: 'DailyCode' does not appear to be a git repositoryfatal: Could not read from remote repository.Please make sure you have the correct access rights and the repository exists.
- push又出错 fatal: unable to access 'https://github.com/18292872556/DailyCode.git/': Recv failure: Connection was reset
克隆远程仓库时报错信息
在本地文件夹内克隆远程仓库时报错
$ git clone https://github.com/xxxxx/xxxx.git
Cloning into '仓库名'...
fatal: unable to access 'https://github.com/xxxxx/xxxx.git/': Recv failure: Connection was reset
前情报错
- 换了电脑用,github账号添加SSL处,有两条不同电脑信息,git与github应该绑定成功,已经通过绑定登录账号。
- 之前克隆成功仓库,add正常,push报错。
- 并且github加载不稳定,白天可以打开,晚上加载不出来
删掉本地克隆的仓库,重新克隆
克隆时报错
$ git clone https://github.com/18292872556/DailyCode.git
Cloning into 'DailyCode'...
fatal: unable to access 'https://github.com/18292872556/DailyCode.git/': Recv failure: Connection was reset
解决:
- 检查ssl链接输入
ssh
ssh-keygen -t rsa
输入y其他回车,覆盖ssl
- 再次克隆,克隆成功
- 再次尝试提交代码
push出错 fatal: ‘DailyCode’ does not appear to be a git repositoryfatal: Could not read from remote repository.Please make sure you have the correct access rights and the repository exists.
报错信息
$ git push DailyCode main
fatal: 'DailyCode' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
解决:
需要检查一下git remote -v
是remote命令错了,再remove掉添加在远程的origin
git remote rm origin
此时再用 git remote -v
就会发现没有origin了,再正确输入git remote add远程仓库名 https://gitee远程仓库的https.git
push又出错 fatal: unable to access ‘https://github.com/18292872556/DailyCode.git/’: Recv failure: Connection was reset
再git push
又报了其他的错
报错信息
$ git push DailyCode main
fatal: unable to access 'https://github.com/18292872556/DailyCode.git/': Recv failure: Connection was reset
解决:
- 依次将如下两条语句复制到git中后,回车。
git config --global --unset http.proxy
git config --global --unset https.proxy
- 打开cmd,将
ipconfig/flushdns
复制,回车,清理DNS缓存 - 再次
push
成功!