当前位置:   article > 正文

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

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

【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
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

纠错过程

  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 出错”,时间限制在一年内,成

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/喵喵爱编程/article/detail/988008
推荐阅读
相关标签
  

闽ICP备14008679号