git "Could not read from remote repository.Please make sure you have the correct access rights."

问题分析:
出现这个问题是因为没有在github账号添加SSH key

解决方法如下:

1.在终端输入

ssh-keygen -t rsa -C "username"

(注:username为你git上的用户名)
如果执行成功。返回

Generating public/private rsa key pair.
Enter file in which to save the key (/Users/username/.ssh/id_rsa):
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/username/.ssh/id_rsa):

首先,说明一下,这里的username是你电脑上的用户名

然后,在这里就是设置存储地址了.我们直接按回车,会出现一下两种情况的一种:

(1)如果正常运行的话,会出现

Enter passphrase (empty for no passphrase):

然后我们直接回车

(2)有的时候我们可能会出现

/Users/your username/.ssh/id_rsa already exists.
Overwrite (y/n)?

这说明你已经设置了存储地址,我们输入“y”覆盖

Overwrite (y/n)? y

回车

上面的任意两种情况之后,会出现

Enter same passphrase again:

再次回车,这时候你会看见:

Your identification has been saved in /Users/username/.ssh/id_rsa.Your public key has been saved in /Users/username/.ssh/id_rsa.pub.The key fingerprint is:58:42:8b:58:ad:4b:b5:b9:6d:79:bf:8c:f9:e2:2b:ed usernameThe key's randomart image is:+--[ RSA 2048]----+|    ...          ||   o oo.         ||  . .ooo.        ||    o o+         ||   . ..oS.       ||    . . + .      ||       . o .     ||        . o+.    ||         +E++.   |+-----------------+
---------------------

这说明SSH key就已经生成了。文件目录就是:

/Users/username/.ssh/id_rsa.pub.

我们执行cat命令查看文件的内容:

cat /User/username/.ssh/id_rsa.pub

这时候会看见:

ssh-rsa AAAAB3NzaC1yc2。。。。。。。。。

后面的内容我省略了
(说明:ssh-rsa 后面的内容这就是你的SSH keys)
把显示出来的SSH keys直接添加到github账户设置里边的SSH keys
最后再执行

git clone

命令就可以了

git Could not read from remote repository.Please make sure you have the correct access rights.相关推荐

  1. 提交git push 的时候报错,Please make sure you have the correct access rights

    这种情况是SSH的问题,通过以下几步即可解决 1. 删除本地  .ssh 文件: 一般.ssh文件,放在"C:\Users\用户名 "路径下,直接删掉即可. 2. 生成新的SSH: ...

  2. git问题:Please make sure you have the correct access rights and the repository exists.

    当遇到如标题所示问题,打开终端 MBP:baiyunshen_rn lianyu02$ git pull git@gitlab.intebox.com: Permission denied (publ ...

  3. github推送Please make sure you have the correct access rights and the repository exists.

    A: github推送和拉取报错: kex_exchange_identification: read: Connection reset by peer fatal: Could not read ...

  4. Git clone时出现Please make sure you have the correct access rights and the repository exists.问题已解决。

    Git clone时出现Please make sure you have the correct access rights and the repository exists.问题已解决. 参考文 ...

  5. git遇到的问题之“Please make sure you have the correct access rights and the repository exists.”...

    对于git的提交一直很小心翼翼,感觉一不小心就会踩到莫名的坑. 这不, 某天commit 就遇到了On branch master nothing to commit (working directo ...

  6. (转)git遇到的问题之“Please make sure you have the correct access rights and the repository exists.”...

    对于git的提交一直很小心翼翼,感觉一不小心就会踩到莫名的坑. 这不, 某天commit 就遇到了On branch master nothing to commit (working directo ...

  7. git clone 时候出现Please make sure you have the correct access rights and the repository exists.

    输入 git clone 命令时出现Please make sure you have the correct access rights and the repository exists.错误,出 ...

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

    Please make sure you have the correct access rights and the repository exists 重新在git设置一下身份的名字和邮箱 git ...

  9. 解决Please make sure you have the correct access rights and the repository exists 问题

    ** 解决Please make sure you have the correct access rights and the repository exists 问题. (一) 原因如下: 公钥出 ...

最新文章

  1. 回溯 皇后 算法笔记_算法笔记_04_回溯
  2. FusionChart
  3. R语言常用函数总结大全
  4. Struts2中 Result类型配置详解
  5. Android学习笔记-----一个很好用的搜索网站,你懂的
  6. hpuoj--1093: 回文数(一)
  7. springboot _全局异常@RestControllerAdvice@ExceptionHandler
  8. AGS Server 10.1 切图工具
  9. 使用displsy:flex + overflow:hidden时子元素被压缩
  10. BaseAnimation
  11. Windows Driver开发_TraceEvents调试以及加载驱动的方法
  12. 图像patch feature源码
  13. 乐讯网python论坛_麻瓜编程Python Web基础视频教程 - 里客云
  14. System center 2012 R2 实战九、SCOM+sharpoint+visio实现全国地图展示
  15. Mysql索引优化及面试题
  16. Python语言程序设计基础 第二版(嵩天著)课后答案第五章
  17. 问题 C: 百头百脚
  18. 搬家公司怎么收费 搬家收费标准
  19. 解决md导入CSDN中图片大小过大 改变图片的大小
  20. 2.4g和5g要不要合并_无线路由2.4g和5g要同时开吗

热门文章

  1. linux htb 源代码,LINUX TC:HTB相关源码
  2. mysql3.5.2 下载_mybatis 3.5.2 jar 下载
  3. 树莓派安装mosquitto提示“MOSQ_1.5” not found
  4. 【转载保存】HtmlUnit的使用
  5. 云计算与星辰大海的结合
  6. 浅谈 Spark 的多语言支持
  7. 程序员如何让自己 Be Cloud Native - 配置篇
  8. 少拿游戏来骗我,虚幻引擎5上的《黑客帝国》全新体验,画面帅到爆
  9. 携程发布2020年财报:四季度营业利润率10% 疫情以来连续两季度盈利
  10. 赠书 | SkyWalking 观测 Service Mesh 技术大公开