【git】fatal: Could not read from remote repository.

【git】fatal: Could not read from remote repository.前提操作报错代码纠错过程报错原因处理方法新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的...
摘要由CSDN通过智能技术生成

【git】fatal: Could not read from remote repository.


)

前提操作

许久没用git了,我有预感,这会是一个**的错
我git clone https://github.com/username/responsitory.git

报错代码

Cloning into 'offer-Java'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

纠错过程

  1. 先看了有道以前的笔记(不知道写的啥,没啥用)
    git pull
    问题:could not read from remote repository …
    原因:git remote -v 出来后都是ssh …
    我 git set-url origin https://… 修改地址
    再 git remote -v 还是 ssh
    是因为设置了提交方式是ssh,而我的远程仓库没有没有添加公钥
    解决:1.把提交方式改为https
    这样每次提交都要输入密码
    2.创建并把公钥加入远程仓库
    git remote -v git查看远程仓库地址命令

  2. 使用命令把ssh更改为https失败

  3. 搜索“ssh更改为http失败”,无果

  4. 搜索“git clone 出错”,时间限制在一年内,成

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值