我们在使用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."解决方案的更多相关文章

  1. 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 或其他命令的时候,有时候会遇到这 ...

  2. 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 ...

  3. 【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 ...

  4. 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 :    ...

  5. 关于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 ...

  6. 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. ...

  7. git Could not read from remote repository 解决

    错误: fatal: 'origin' does not appear to be a git repository fatal: Could not read from remote reposit ...

  8. windows 部署 git 服务器报 Please make sure you have the correct access rights and the repository exists.错误

    这两天在阿里云上弄windows 服务器,顺便部署了一个git服务.根据网上教程一步步操作下来,最后在 remote远程仓库的时候提示 fatal: 'yourpath/test.git' does ...

  9. 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 ...

随机推荐

  1. Scala环境安装设置

    Scala语言可以安装在任何类UNIX或Windows系统.要安装Scala,必须先安装Java1.5或更高版本安装在计算机上. Windows上安装Scala: 步骤(1):JAVA设置: 首先,必 ...

  2. bzoj3671 [Noi2014]随机数生成器

    传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=3671 [题解] 贪心从1...n*m取,开两个5000*5000的数组就够了,可以重复利用, ...

  3. 【BZOJ】1014 [JSOI2008]火星人prefix

    [算法]splay [题解]对于每个结点维护其子树串的hash值,前面为高位,后面为低位. sum[x]=sum[L]*base[s[R]+1]+A[x]*base[s[R]]+sum[R],其中su ...

  4. [bzoj3993][SDOI2015]星际战争-二分+最大流

    Brief Description 3333年,在银河系的某星球上,X军团和Y军团正在激烈地作战.在战斗的某一阶段,Y军团一共派遣了N个巨型机器人进攻X军团的阵地,其中第i个巨型机器人的装甲值为Ai. ...

  5. Coursera在线学习---第九节(1).异常数据检测(Anomaly Detection)

    一.如何构建Anomaly Detection模型? 二.如何评估Anomaly Detection系统? 1)将样本分为6:2:2比例 2)利用交叉验证集计算出F1值,可以用F1值选取概率阈值ξ,选 ...

  6. Linux中查看进程占用内存的情况【转】

    转自:http://hutaow.com/blog/2014/08/28/display-process-memory-in-linux/ Linux中查看某个进程占用内存的情况,执行如下命令即可,将 ...

  7. linux驱动基础系列--Linux mmc sd sdio驱动分析

    前言 主要是想对Linux mmc子系统(包含mmc sd sdio)驱动框架有一个整体的把控,因此会忽略某些细节,同时里面涉及到的一些驱动基础,比如平台驱动.块设备驱动.设备模型等也不进行详细说明原 ...

  8. Vim中的键映射【转】

    转自:http://www.cnblogs.com/softwaretesting/archive/2011/09/28/2194515.html http://www.pythonclub.org/ ...

  9. 利用keepalive+mysql replication 实现数据库的高可用

    利用keepalive+mysql replication 实现数据库的高可用 http://www.xuchanggang.cn/archives/866.html

  10. 解决sql server中批处理过程中“'CREATE/ALTER PROCEDURE 必须是查询批次中的第一个语句”

    在批处理中加字段或表或视图或存储过程是否存在的判断 -----------------------------------------line----------------------------- ...