问题:今天在用idea往github推送代码的时候,出现了下面的报错

原因:是ssh key有问题,连接不上服务器

解决:

1.得重新在git设置一下身份的名字和邮箱

git config --global user.name "yourname"

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

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

2.删除.ssh文件夹(在C:\Users\某某某)下的known_hosts

3.git输入命令

ssh-keygen -t rsa -C "your@email.com"

your@email是你之前要设置的邮箱。

敲完命令按下回车后出现

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.在浏览器登录你的github账号,进入设置,点击这一项

往key里面粘贴刚刚复制的内容,点击add ssh key.

5.在git中输入下面的命令

ssh -T git@github.com

显示一些信息,输入yes,回车,提示你成功了。

最后退出git和idea,重新进入,往远程库push代码,发现成功了。

完。

参考:https://blog.csdn.net/jingtingfengguo/article/details/51892864

git push遇到的问题“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 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 ...

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

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

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

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

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

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

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

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

  8. 报错 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 ...

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

  10. 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. linux 允许root 用户登录(旧)

    前言 旧博客迁移的内容 正文 vi /etc/ssh/sshd_config 将PermitRootLogin值改yes service sshd restart

  2. kolla-ansible部署OpenStack Train版技术方案

    简单架构示意 项目目标 1. 实现容器化部署docker+ Ansible+openstack-tarin 2. 使用keeplived监控nova服务实现在单台服务器宕机的情况下能迅速切断连接减轻平 ...

  3. FFmpeg开发笔记(十六)Linux交叉编译Android的OpenSSL库

    ​<FFmpeg开发实战:从零基础到短视频上线>一书的例程主要测试本地的音视频文件,当然为了安全起见,很多网络视频都采用了https地址.FFmpeg若要访问https视频,就必须集成第三 ...

  4. 如何把jQuery对象转成DOM对象?OR DOM对象转化成jQuery对象

    如何把jQuery对象转成DOM对象? 参考:https://www.imooc.com/code/8110 利用数组下标的方式读取到jQuery中的DOM对象 <div>元素一</ ...

  5. 力扣620(MySQL)-有趣的电影(简单)

    题目: 某城市开了一家新的电影院,吸引了很多人过来看电影.该电影院特别注意用户体验,专门有个 LED显示板做电影推荐,上面公布着影评和相关电影描述. 作为该电影院的信息部主管,您需要编写一个 SQL查 ...

  6. 第 2章Python 爬虫基本库的使用

    第 2章Python 爬虫基本库的使用 爬虫并没有你想象中的复杂,很多初学者一开始就担忧,比如怎么写代码去构造请求,怎么把请求发出去,怎么接收服务器的响应,需不需要学习 TCP/IP 四层模型的每一层 ...

  7. Dataphin核心功能(四):安全——基于数据权限分类分级和敏感数据保护,保障企业数据安全

    简介:<数据安全法>的发布,对企业的数据安全使用和管理提出了更高的要求.Dataphin提供基于数据分级分类和数据脱敏的敏感数据识别和保护能力,助力企业建立合规的数据安全体系,保障企业数据 ...

  8. JVM性能提升50%,聊一聊背后的秘密武器Alibaba Dragonwell

    ​简介: 你要知道的关于Alibaba Dragonwell一些重要优化措施. ​ 今年四月五日,阿里云开放了新一代ECS实例的邀测[1],Alibaba Dragonwell也在新ECS上进行了极致 ...

  9. RT-Thread 堆区大小设置

    一.利用栈区的空间作为堆区 看过我之前的笔记的小伙伴都知道,以前我是通过申请栈区的空间使用的,感兴趣的小伙伴可以看我之前的笔记,RT-Thread移植到stm32. 在board.c文件文件中的代码如 ...

  10. ruby执行周期性任务 whenever

    ruby执行周期性任务 下面看看怎么将任务写入cron服务. $ whenever #不带参数的whenever会显示转换程cron任务的代码,不写入cron任务表 $ whenever -w #写入 ...