【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
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上的用户名)
如果执行成功。返回
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):
首先,说明一下,这里的
然后,在这里就是设置存储地址了.我们直接按回车,会出现一下两种情况的一种:
(1)如果正常运行的话,会出现
然后我们直接回车
(2)有的时候我们可能会出现
Overwrite (y/n)?
这说明你已经设置了存储地址,我们输入“y”覆盖
上面的任意两种情况之后,会出现
Enter same passphrase again:
再次回车,这时候你会看见:
Your public key has been saved in /Users/
The key fingerprint is:
username
+--[ RSA 2048]----+
| ... |
| o oo. |
| . .ooo. |
| o o+ |
| . ..oS. |
| . . + . |
| . o . |
| . o+. |
| +E++. |
这说明SSH key就已经生成了。文件目录就是:username/.ssh/id_rsa.pub.
我们执行cat命令查看文件的内容:
username/.ssh/id_rsa.pub
这时候会看见:
(说明:ssh-rsa 后面的内容这就是你的SSH keys)
把显示出来的SSH
keys直接添加到github账户设置里边的SSH keys
怎么添加SSHkeys,参见另一片关于git的文章
最后再执行git clone命令就可以了
【git 报错】Could not read from remote repository.Please make sure you have the correct access rights.的更多相关文章
- 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 "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 或其他命令的时候,有时候会遇到这 ...
- Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights
第一次提交遇到这样的情况,怎么回事呢,我在github上提交了ssh key 的啊. 排查先看看能不能解析, 1.先 ping https://github.com 把ip添加到 host : ...
- 关于github报错:ssh: connect to host github.com port 22: Connection timed outfatal: Could not read from remote repository.Please make sure you have the correct access rightsand the repository exists.
当执行git命令如:git clone.git pull等等 出现报错:ssh: connect to host github.com port 22: Connection timed outfat ...
- Jenkins新建项目中源码管理Repository URL使用Git报错:Failed to connect to repository : Command "git ls-remote -h......
之前部署了Gitlab+Gerrit+Jenkins持续集成环境,但在Jenkins中新建项目的源码管理"Repository URL"中添加git地址环节出现了问题,信息为&qu ...
- linux git 报错提示 fatal: 'origin' does not appear to be a git repository 解决办法
输入: git pull origin master git报错提示 fatal: 'origin' does not appear to be a git repository fatal: Cou ...
- 记一次使用git报错,解决Unable to negotiate with **** port 22: no matching host key type found. Their offer: ssh-rsa
windows电脑重装系统,去官网下载了最新的git安装,一路next下来,打开bash按老路子设置,生成公钥 git config --global user.name "yourname ...
- 【Devops】【docker】【CI/CD】jenkins源码管理,添加SSH地址后报错+Jenkins构建报错:Please make sure you have the correct access rights and the repository exists.
jenkins源码管理,添加SSH地址后报错: Could not read from remote repository. Please make sure you have the correct ...
随机推荐
- 200用户的并发用户配置(CSV)
我来解释一下为什么标题是,设置多个参数对浏览器进行访问,原本想写成对app或者web,但是我想只要有参数的地方无聊是app或者web或者小程序,都是可以用到设置参数的. 第一步:在线程组下添加参数配置 ...
- JVM内容梳理
- IDEA VM设置
1.IDEA vm options -server -Xms800m -Xmx800m -XX:PermSize=64M -XX:MaxNewSize=256m -XX:MaxPermSize=128 ...
- 机器学习中的算法(2)-支持向量机(SVM)基础
版权声明:本文由LeftNotEasy发布于http://leftnoteasy.cnblogs.com, 本文可以被全部的转载或者部分使用,但请注明出处,如果有问题,请联系wheeleast@gma ...
- ExecutorService——shutdown方法和awaitTermination方法
ExecutorService的关闭shutdown和awaitTermination为接口ExecutorService定义的两个方法,一般情况配合使用来关闭线程池. 方法简介shutdown方法: ...
- Linux安装配置JDK1.7
1 在/usr/local 文件夹下新建一个文件夹software ,将JDK放到此文件夹中 并在此文件夹下解压执行命令 tar zxvf jdk-8u144-linux-x64.tar. ...
- 微信开发 invalid openid
微信开发时候测试号运行正常,换到正式号就会报invalid openid的错误. 看了微信问答系统里的答案,说是json格式的问题,但是我这边不是这个原因. 后来突然想到了,应该是AppId和AppS ...
- ELK-WEB中文汉化和安全认证
1.Kibana汉化方法此项目,适用于Kibana 5.x-6.x的任意版本,汉化过程不可逆 1)Github仓库下载kibana中文汉化包,下载指令如下: git clone https://git ...
- 反射与特性与Tool编写
大多数程序都是用来处理数据的,他们读,写,操作和显示数据,图形也是一种数据. 程序员为某种目的创建和使用一些类型,因此,在设计时必须理解所使用类型的特性. 有关程序及其类型的数据被称为元数据,他们保存 ...
- jenkins+sonarQube代码质量扫描 并排除指定的目录
sonar.projectKey=dev1-news-paymentsonar.projectName=dev1-news-paymentsonar.projectVersion=$BUILD_NUM ...