git提交出现”Could not read from remote repository.Please make sure you have the correct access rights”错误
2018-03-10 19:31
1156 查看
一、我在使用git 的遇到“Could not read from remote repository.Please make sure you have the correct access rights”
开始看不懂是什么错,然后自己百度一下,发现是ssh key的问题,看了答案但都不是很完整,所以自己整理一哈,加深印象预防下次再次出现此问题。
解决方法如下:
1、git输入命令:$ ssh-keygen -t rsa -C "your@email.com"(请填你设置的邮箱地址)
如果执行成功返回:
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/username/.ssh/id_rsa):
然后直接按回车,接着系统会自动在.ssh文件夹下生成两个文件,分别是id_rsa和id_rsa.pub,用记事本打开id_rsa.pub复制里面全部内容。
2、打开github官网登陆自己的账户,进入设置,点击SSH and GPG keys打开该页面,把刚才复制的粘贴在key中,入下图:
title可以不填,最后点击add ssh key。
3、在git中输入:ssh -T git@github.com,然后根据提示输入命令yes,回车就会提示你成功。
二、同一天我还遇到了“fatal: remote origin already exists ”错误,所以就一并记了解决方法。
解决方法如下:
1、先删除远程Git仓库
git remote rm origin
2、再添加远程Git仓库
git remote add origin url(要添加的远程仓库地址)
开始看不懂是什么错,然后自己百度一下,发现是ssh key的问题,看了答案但都不是很完整,所以自己整理一哈,加深印象预防下次再次出现此问题。
解决方法如下:
1、git输入命令:$ ssh-keygen -t rsa -C "your@email.com"(请填你设置的邮箱地址)
如果执行成功返回:
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/username/.ssh/id_rsa):
然后直接按回车,接着系统会自动在.ssh文件夹下生成两个文件,分别是id_rsa和id_rsa.pub,用记事本打开id_rsa.pub复制里面全部内容。
2、打开github官网登陆自己的账户,进入设置,点击SSH and GPG keys打开该页面,把刚才复制的粘贴在key中,入下图:
title可以不填,最后点击add ssh key。
3、在git中输入:ssh -T git@github.com,然后根据提示输入命令yes,回车就会提示你成功。
二、同一天我还遇到了“fatal: remote origin already exists ”错误,所以就一并记了解决方法。
解决方法如下:
1、先删除远程Git仓库
git remote rm origin
2、再添加远程Git仓库
git remote add origin url(要添加的远程仓库地址)
相关文章推荐
- Git"Could not read from remote repository.Please make sure you have the correct access rights."解决方案
- 解决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.
- git "Could not read from remote repository.Please make sure you have the correct access rights."解决方案
- git "Could not read from remote repository.Please make sure you have the correct access rights."解决方案
- git "Could not read from remote repository.Please make sure you have the correct access rights."解决方案
- git "Could not read from remote repository.Please make sure you have the correct access rights."解决方案
- Could not read from remote repository.Please make sure you have the correct access rights.and the re
- Could not read from remote repository.Please make sure you have the correct access rights.and the re
- 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 acces
- git pull 出错 fatal: Could not read from remote repository.Please make sure you have the correct acces
- git pull 出错 fatal: Could not read from remote repository.Please make sure you have the correct acces
- git clone时出现Please make sure you have the correct access rights and the repository exists.错误
- [Git & GitHub] 解决办法:Could not read from remote repository.Please make sure you have the...
- 命令hexo d 出现错误 Please make sure you have the correct access rights and the repository exists.
- git遇到的问题之“Please make sure you have the correct access rights and the repository exists.”
- git遇到的问题之“Please make sure you have the correct access rights and the repository exists.
- Git_Please make sure you have the correct access rights.and the repository exist
- git pull出错fatal:Please make sure you have the correct access rights.and the repository exists.