对于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://www.cnblogs.com/Free-Thinker/p/10273590.html

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

  1. (转)git遇到的问题之“Please make sure you have the correct access rights and the repository exists.”...

    对于git的提交一直很小心翼翼,感觉一不小心就会踩到莫名的坑. 这不, 某天commit 就遇到了On branch master nothing to commit (working directo ...

  2. git由于网络原因导致 please make sure you have the correct access rights and the repository exists

    之前遇到权限总是去重新生成sshkey,然后重新配置,懵逼的是:用着用着突然就有问题了,然后坐等,等会就好了,有毒啊,我啥都没动 经过一个多月的,实际操作,发现仅仅在公司的网络环境会出现这种情况,在家 ...

  3. git clone 时候出现Please make sure you have the correct access rights and the repository exists.

    输入 git clone 命令时出现Please make sure you have the correct access rights and the repository exists.错误,出 ...

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

    Git clone时出现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.

    当遇到如标题所示问题,打开终端 MBP:baiyunshen_rn lianyu02$ git pull git@gitlab.intebox.com: Permission denied (publ ...

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

    1   删除.ssh文件夹(直接搜索该文件夹)下的known_hosts(手动删除即可,不需要git) 2   在下载好的Git中的bin目录下打开bash.exe输入命令ssh-keygen -t ...

  7. git 报错:Please make sure you have the correct access rights and the repository exists

    提示:Warning: Permanently added 'gitee.com,120.55.226.24' (ECDSA) to the list of known hosts.是公钥出问题了,要 ...

  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”错误

    一.报错的界面显示 二.可能的问题 1.你的ssh key有问题,需要重新生成配置 2.你没有在阿里云中配置你新生成的秘钥 三.解决方法 1.针对ssh key错误的解决方法 (1)搜索.ssh文件, ...

最新文章

  1. Redis 性能问题分析(好文推荐)
  2. 提示You don't have permission to access /index.php on this server.
  3. OpenGL基于PBR的图像的光照IBL的实例
  4. [转]史上最全的后端技术大全,你都了解哪些技术呢?
  5. c# windows服务状态、启动和停止服务
  6. 【摘】蓝牙技术及其协议栈
  7. Docker部署Ghost
  8. catia相合约束怎么反向_洛丽塔服饰怎么画?教你如何画动漫人物的衣服?
  9. 医疗器械软件网络安全法规和标准概述(本文末付本文提到的所有标准)
  10. 计算机信息计量单位kgm,工程单位换算表.pdf
  11. Cloudera Manager介绍
  12. 嵌入式linux软件如何进行数据参数保存
  13. 学计算机每天应该吃什么,上班族长时间看电脑,哪些食物对眼睛好?
  14. matlab function调用m文件,matlab下编写和调用函数(在同一个m文件中)
  15. i春秋-2016-2017年信息安全竞赛 Web writeup 补题 By Assassin
  16. 动画函数封装 —— 筋头云图案跟随鼠标移动
  17. dhu 深度学习与应用实践
  18. mysql 收缩日志_MySQL5.7中Undo回收收缩相关参数
  19. DM10分区图解教程
  20. vue 不同用户登录系统拥有不同查看菜单导航的权限

热门文章

  1. C语言中main函数的研究,以及对代码断点调试的研究(王爽老师 汇编语言)
  2. 了解DSP的体系结构
  3. ARM存储器的大小端存储方式
  4. python从入门到实践 第12章 武装飞船 之 调整飞船的速度程序实践
  5. c#操作mysql 执行语句_c# 数据库编程(通过SqlCommand 执行DML语句)
  6. Linux网络编程---详解TCP
  7. 手写单隐层神经网络_鸢尾花分类(matlab实现)
  8. C 语言 方法外部的数组与普通变量传入方法内部时的区别
  9. [BUUCTF-pwn]——wustctf2020_getshell_2
  10. 1.0 mysql的连接