我们在使用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. jmeter进行http压力测试(图文小教程)

    下载地址:http://jmeter.apache.org/download_jmeter.cgi JMeter基于Java开发,需要系统有安装JDK环境.解压后进入bin目录,点击jmeter.ba ...

  2. Spring 路由地址的基本使用

    1.下面是spring的使用基本框架连接 https://www.cnblogs.com/HD/p/4103239.html

  3. 使用idea+Tomcat搭建servlet服务器

    1.使用java 搭建一个简单的Servlet 服务器 https://blog.csdn.net/qq_35164169/article/details/76146655

  4. 大聊Python-----网络编程

    什么是Socket? socket本质上就是在2台网络互通的电脑之间,架设一个通道,两台电脑通过这个通道来实现数据的互相传递. 我们知道网络 通信 都 是基于 ip+port 方能定位到目标的具体机器 ...

  5. CSS 竖线颜色渐变

    <!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"& ...

  6. js中的apply、call、bind

    每个函数都包含两个非继承而来的方法,call()和apply(),可以改变函数内部this的指向 1.apply 用另一个对象替换当前对象,接收两个参数,第一个参数表示需要绑定的this变量,第二个参 ...

  7. Fiddler抓取HTTPS协议

    HTTPS协议握手过程: 1,客户端明文请求,把自己支持的非对称加密算法(用于使用CA证书公钥加密计算生成协商密钥的随机数per_master).对称加密算法(用于以后使用协商密钥加密传输内容).验证 ...

  8. FastDFS介绍和配置过程

    由于网站使用nfs共享方式保存用户上传的图片,附件等资料,然后通过apache下载的方式供用户访问,在网站架构初期,使用这种简单的方式实现了静态资源的读写分离,但随着网站数据量的增加,图片服务器渐渐成 ...

  9. Linux 入门记录:三、Linux 文件基本操作管理

    一.复制文件.目录 使用 cp 命令复制文件或目录: $ cp 源文件(夹)目标文件(夹) 常用参数: -r 递归复制整个目录树 -v 显示复制过程的详细信息 二.移动.重命名文件或目录 通过 mv  ...

  10. python基础===monkeytype可以自动添加注释的模块!

    monkeytype 一个可以自动添加注释的模块! 先要下载: pip install monkeytype 以官网的sample code为例 #moudle.py def add(a, b): r ...