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.
出现这个问题是因为没有在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 (/root/.ssh/id_rsa):
然后,在这里就是设置存储地址了.我们直接按回车,会出现一下两种情况的一种:
(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:
再次回车,这时候你会看见:
这说明SSH key就已经生成了。文件目录就是:/root/.ssh/id_rsa.pub.
我们执行cat命令查看文件的内容:
cat /root/.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."解决方案的更多相关文章
- 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 报错】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 ...
- 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 ...
- 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 Could not read from remote repository 解决
错误: fatal: 'origin' does not appear to be a git repository fatal: Could not read from remote reposit ...
- windows 部署 git 服务器报 Please make sure you have the correct access rights and the repository exists.错误
这两天在阿里云上弄windows 服务器,顺便部署了一个git服务.根据网上教程一步步操作下来,最后在 remote远程仓库的时候提示 fatal: 'yourpath/test.git' does ...
- Git push提交时报错Permission denied(publickey)...Please make sure you have the correct access rights and the repository exists.
一.git push origin master 时出错 错误信息为: Permission denied(publickey). fatal: Could not read from remote ...
随机推荐
- 常见XSD问题
< xs:elementname="status"> < xs:complexType> < xs:sequence> < xs:elem ...
- 【51NOD】数字1的数量
[算法]数位DP [题解]数位dp总结 之 从入门到模板 #include<cstdio> #include<algorithm> #include<cstring> ...
- Spring中获取request的几种方法,及其线程安全性分析(山东数漫江湖)
前言 本文将介绍在Spring MVC开发的web系统中,获取request对象的几种方法,并讨论其线程安全性. 原创不易,如果觉得文章对你有帮助,欢迎点赞.评论.文章有疏漏之处,欢迎批评指正. 欢迎 ...
- 转 TCP中的序号和确认号
在网络分析中,读懂TCP序列号和确认号在的变化趋势,可以帮助我们学习TCP协议以及排查通讯故障,如通过查看序列号和确认号可以确定数据传输是否乱 序.但我在查阅了当前很多资料后发现,它们大多只简单介绍了 ...
- PKUWC 2019 自闭记
PKUWC 2019 自闭记 Day -1 考前天天在隔壁的物竞教室划水(雀魂,能和吉老师一起玩的游戏都是好游戏),没有做题. Day 0 早上8:16的高铁,到广州南居然要6个小时...不知道福州和 ...
- Call Mode feature
起源 user 在插著 充電器 打電話的狀況下, 為了安全起見, 避免 充電器在這時損害手機,間接造成 user 的傷害, 而有了這 feature, 在 battery voltage Vbat & ...
- STL不同容器的使用方法
以下内容摘自:http://blog.csdn.net/u014465639/article/details/70241850 1.vector(需要导入头文件#include <vector& ...
- API(全局配置,全局API)
全局配置 Vue.config是一个对象,包含Vue的全局配置 silent 类型:boolean 默认值:false 用法 Vue.config.silent=true 取消Vue所有的日志与警告 ...
- ie6下面不支持!important的处理方法
例子: #box { color:red !important; color:blue; } 这个例子应该是大家经常见到的important的用法了,在IE6环境下,这行字是蓝色 ...
- Leetcode 之Binary Tree Postorder Traversal(46)
采用广度优先遍历,一个变量记录层数,一个变量记录方向. void traverse(TreeNode *root, vector<vector<int>> result, in ...