对于git的提交一直很小心翼翼,感觉一不小心就会踩到莫名的坑。

这不,

某天commit 就遇到了On branch master nothing
to commit (working directory clean)

一查意思。你的分支很干净?

干净?excuse me?

然后git push origin master一下,漫长等待了弹出了fail:#¥%@(此处省略,我们看重点)

Please make sure you have the correct access rights and the repository exists.

然后谷歌了一下,原来是ssh key有问题,连接不上服务器~~

然后我开始了死胡同~~

参阅了很多的答案,发现写的都不是很完整,自己东摸索西摸索搞定了,怕忘记,记录一下

1、首先我得重新在git设置一下身份的名字和邮箱(因为当初都忘了设置啥了,因为遇到坑了)进入到需要提交的文件夹底下(因为直接打开git Bash,在没有路径的情况下,根本没!法!改!刚使用git时遇到的坑。。。)

git config --global user.name "yourname"

git config --global user.email“your@email.com"

注:yourname是你要设置的名字,your@email是你要设置的邮箱。

2、删除.ssh文件夹(直接搜索该文件夹)下的known_hosts(手动删除即可,不需要git)

3、git输入命令

$ ssh-keygen -t rsa -C "your@email.com"(请填你设置的邮箱地址)

接着出现:

Generating public/private rsa key pair.

Enter file in which to save the key (/Users/your_user_directory/.ssh/id_rsa):

请直接按下回车

然后系统会自动在.ssh文件夹下生成两个文件,id_rsa和id_rsa.pub,用记事本打开id_rsa.pub

将全部的内容复制

4、打开https://github.com/,登陆你的账户,进入设置

进入ssh设置

在key中将刚刚复制的粘贴进去

点击add ssh key,

ok!

5、在git中输入命令:

ssh -T git@github.com

然后会跳出一堆话。。

输入命令:yes

回车

然后就会提示你成功了~~

泪牛满面~~

最后退出git重新进入路径提交一下就可以了~~

转载----https://blog.csdn.net/jingtingfengguo/article/details/51892864

git遇到的问题之“Please make sure you have the correct access rights and the repository exists.”的更多相关文章

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

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

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

  4. 使用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.问题已解决. 今天我在使用 ...

  5. [Git]Please make sure you have the correct access rights and the repository exists

    这个问题是这样,需要在已有github账号的A机器上,再创建一个github账号,新账号创建完毕,将代码通过机器A push上之后,再另一台机器B,clone 这个项目时报出了如下错误: Permis ...

  6. Git clone时出现Please make sure you have the correct access rights and the repository exists.问题已解决。

    看了好多资料终于搞定了git 中clone命令报错这个问题,废话不多说直接上步骤希望对大家有帮助. 1   删除.ssh文件夹(直接搜索该文件夹)下的known_hosts(手动删除即可,不需要git ...

  7. 报错 Please make sure you have the correct access rights and the repository exists (git 添加ssh密钥 )

    1.设置Git的user name和email $ git config --global user.name "wubaiwan" $ git config --global u ...

  8. Git提交时提示“Please make sure you have the correct access rights and the repository exists.”的解决方法

    1.首先打开Git Bash设置名字和邮箱: git config --global user.name "你的名字" git config --global user.email ...

  9. Git出错:“Please make sure you have the correct access rights and the repository exists.”

    此问题是需要重置ssh密钥 解决步骤如下: 1.重置用户名和邮箱: 打开Git Bash 进入Git命令,输入以下命令 git config --global user.name "你的用户 ...

随机推荐

  1. Ajax异步请求原理的分析

    我们知道,在同步请求模型中,浏览器是直接向服务器发送请求,并直接接收.处理服务器响应的数据的.这就导致了浏览器发送完一个请求后,就只能干等着服务器那边处理请求,响应请求,在这期间其它事情都做不了.这就 ...

  2. 【BZOJ2594】【WC2006】水管局长

    日……又被傻B错坑了一整天…… 原题: SC省MY市有着庞大的地下水管网络,嘟嘟是MY市的水管局长(就是管水管的啦),嘟嘟作为水管局长的工作就是:每天供水公司可能要将一定量的水从x处送往y处,嘟嘟需要 ...

  3. C# to IL 4 Keywords and Operators(关键字和操作符)

    Code that is placed after the return statement never gets executed. In the first programgiven below, ...

  4. DevExpress开发win8风格界面

    由于近期在对项目软件界面进行优化,找到了一款效果挺炫的插件,DevExpress15.2,可以制作win8可以滑动图标那个界面的效果,不多说,先贴图: (你没看错,这是用C#winform实现的) 可 ...

  5. python 用type()创建类

    type()可以查看一个类型,也可以查看变量的类型 class Hello1(object): def hello(self, name = 'world'): print('Hello, %s' % ...

  6. sql server 用户创建与权限管理

    要想成功访问 SQL Server 数据库中的数据, 我们需要两个方面的授权:一.获得准许连接 SQL Server 服务器的权利: 二.获得访问特定数据库中数据的权利(select, update, ...

  7. spring-boot-dependencies jar 不完整的问题

    集成 springboot 有两种方式. 1 直接 父项目指向  springboot <parent> <groupId>org.springframework.boot&l ...

  8. ElasticeSearch(五)分布式索引架构

    关于分布式架构 首先将ES默认每个索引是5个分片,这样做得目的是两个一个索引的时候速度更快(将数据写到小分片的尾部比写入大分片尾部更加快):另外一个是当数据量达到一定程度之后,分片查询,在汇总(sca ...

  9. RedHat6.5安装Spark集群

    版本号: RedHat6.5   RHEL 6.5系统安装配置图解教程(rhel-server-6.5) JDK1.8      http://blog.csdn.net/chongxin1/arti ...

  10. Hadoop "Cannot create directory .Name node is in safe mode."解决方案

    转载自:http://www.waitig.com/hadoop-name-node-is-in-safe-mode.html 在使用Hadoop建立文件的时候,出现“Cannot create di ...