git "Could not read from remote repository.Please make&n
git "Could not read from remote repository.Please make sure you have the correct access rights."解决方案

版权声明:本文为博主原创文章,未经博主允许不得转载。
我们在使用Git clone 或其他命令的时候,有时候会遇到这类问题,如图:
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
fatal: Could not read from remote repository.Please make sure you have the correct access rights and the repository exists.
出现这个问题是因为没有在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 username
The 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&n的更多相关文章
- git Could not read from remote repository 解决
错误: fatal: 'origin' does not appear to be a git repository fatal: Could not read from remote reposit ...
- git "Could not read from remote repository.Please make sure you have the correct access rights."解决方案
我们在使用git clone 或其他命令的时候,有时候会遇到这类问题,如图: fatal: Could not read from remote repository.Please make sure ...
- 4.git "Could not read from remote repository.Please make sure you have the correct access rights."解决方案
转自:https://zhiku8.com/git-could-not-read-from-remote-repository.html 我们在使用git clone 或其他命令的时候,有时候会遇到这 ...
- git pull 出错 fatal: Could not read from remote repository.Please make sure you have the correct access rights.and the repository exists.
Warning: Permanently added the RSA host key for IP address '192.30.252.131' to the list of known hos ...
- git提示错误关于错误:ssh: Could not resolve hostname github.com: Name or service not known.fatal: Could not read from remote repository.
关于 Git 使用中出现的错误 饥人谷_楠柒 关注 2016.11.02 15:33* 字数 746 阅读 3607评论 5喜欢 10赞赏 1 关于错误:ssh: Could not resolve ...
- remote: Repository not found. fatal: repository 'https://github.com/***/***.git/' not found
通过命令添加新repository到git hub在执行最后一步命令(如下所示)的时候报错 git push -u origin master error:remote: Repository not ...
- 【git 报错】Could not read from remote repository.Please make sure you have the correct access rights.
我们在使用git clone 或其他命令的时候,有时候会遇到这类问题,如图: and the repository exists. fatal: Could not read from remote ...
- [Git] Undo a commit that has already been pushed to the remote repository
If we pushed our changes already to the remote repository we have to pay attention to not change the ...
- git: fatal: Could not read from remote repository
This is probably an Intellij problem. Your key are managed natively by ssh, and Intellij has it's ow ...
随机推荐
- Atitit. 软件开发中的管理哲学--一个伟大的事业必然是过程导向为主 过程导向 vs 结果导向
Atitit. 软件开发中的管理哲学--一个伟大的事业必然是过程导向为主 过程导向 vs 结果导向 1. 一个伟大的事业必然是过程导向为主 1 1.1. 过程的执行情况(有明确的执行手册及标准) ...
- C#将URL中的参数转换成字典Dictionary<string, string>
/// <summary> /// 将获取的formData存入字典数组 /// </summary> public static Dictionary<String, ...
- Post+Get方式接口测试代码编写
详细代码如下 package testproject; import java.io.BufferedReader; import java.io.IOException; import java.i ...
- TCP/IP笔记(八)应用层协议
TCP/IP的应用层涵盖了OSI参考模型中第5.第6.第7层的所有功能,不仅包含了管理通信连接的会话层功能.转换数据格式的标识层功能,还包括与对端主机交互的应用层功能在内的所有功能. 利用网络的应用程 ...
- 如何使用UltraISO将制作的ios文件挂载到虚拟机上面
选中要挂载的文件例如图中蓝色的部分移动到上面,然后点击文件中的保存按钮就可以了. 接下来设置虚拟机上的red hat6.3 记住一定要把红色部分选中,才能在虚拟机上看到 然后点击光盘就可以看到挂载的内 ...
- ORA-01036: 非法的变量名/编号
今天写程序时,往Oracle中插入二进制数据,出现错误ORA-01036:非法的变量名/编号,代码如下: strSql = "INSERT INTO KA99 (KA991,KA992,KA ...
- Python写的贪吃蛇游戏例子
第一次用Python写这种比较实用且好玩的东西,权当练手吧 游戏说明: * P键控制“暂停/开始”* 方向键控制贪吃蛇的方向 源代码如下: 复制代码代码如下: from Tkinter import ...
- YAML 语法小结
专门用来写配置文件的语言,非常简洁和强大,远比 JSON 格式方便. 使用缩进表示层级关系 缩进时不允许使用Tab键,只允许使用空格. 缩进的空格数目不重要,只要相同层级的元素左侧对齐即可 # 表示注 ...
- Deep3d研究
如何使用CNN将视频从2D到3D进行自动转换 http://www.sohu.com/a/128924237_642762 从2D图片生成3D模型(3D-GAN) http://blog.topspe ...
- Effective JavaScript Item 55 接受配置对象作为函数參数
接受配置对象作为函数參数 尽管保持函数接受的參数的顺序非常重要,可是当函数可以接受的參数达到一定数量时.也会让用户非常头疼: var alert = new Alert(100, 75, 300, 2 ...