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. 过程的执行情况(有明确的执行手册及标准) ...
- 并发insert情况下会发生重复的数据插入问题
1.背景 用多线程接收推送的订单数据,把接收的订单数据存到一个表中,实现的需求是:如果接收的订单消息在数据库中已经存在,那么执行update操作:如果没有存在,那么执行insert操作代码逻辑: if ...
- 156. Merge Intervals【easy】
Given a collection of intervals, merge all overlapping intervals. Example Given intervals => me ...
- 陷阱:C++模块之间的”直接依赖“和”间接依赖“与Makefile的撰写
参考:http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/ 参考:http://stackoverflow ...
- 2. Retrofit2 -- Basic Authentication on Android
2. Retrofit2 -- Basic Authentication on Android android Retrofit tutorial 整合基本的认证 Retrofit 1.9 Retro ...
- javaweb乱码(tomcat服务器)
et提交 :<Connector protocol="HTTP/1.1" port="80" redirectPort="8443" ...
- Unity3D入门其实很简单
在上次发布拙作后,有不少童鞋询问本人如何学习Unity3D.本人自知作为一名刚入门的菜鸟,实在没有资格谈论这么高大上的话题,生怕误导了各位.不过思来想去,决定还是写一些自己的经验,如果能给想要入门U3 ...
- 图像jpeg压缩
图像分割 8X8 颜色空间转换RGB->YCbCr 3个8X8的矩阵 离散余弦变换:(Discrete cosine transform),简称DCT. DCT转换后的数组中第一个是一个直线数据 ...
- 设置select选中某个option
<select class="selector"></select> 1.设置value为pxx的项选中 $(".selector"). ...
- MATLAB使用fft求取给定音频信号的频率
一段10s立体声音频,采样率位8000Hz,已知频率为1000Hz clc; clear; [data, Fs] = audioread('1khz_stereo_8000.wav'); fs=Fs; ...