转载自

第一步、确认Git公钥/密钥是否生成:

1、 首先查看本地是否生成git密钥,一般在C盘home目录下:【C:你自己的home目录\.ssh】

第二步:添加Git密钥:

右键->Git base here(前提是已经安装GIt), 具体如何安装Git, 请自行安装

按顺序执行命令

1、git config --global user.name "名称" 添加用户名配置

2、git config --global user.email "git邮箱'' 添加git邮箱配置

3、ssh-keygen -t rsa -C "git邮箱" 根据git邮箱生成公钥密钥, 此步骤切记不要输入密码, 因为idea连接的时候不需要密码. 后续步骤直接回车, 具体请参考截图.

完成以上步骤后, 已经生成密钥。

第三步:Git添加公钥:

将.ssh 的id_rsa.pub文件用编辑器打开, 复制里面的内容添加到git的公钥配置

第四步:确认IDEA是否添加私钥:

File->setting->搜索SSH->选择private key 选择你的私钥文件

第五步:确认IDEA的Git配置是否是本地:

File ->setting->搜说git->修改SSH excutable 为Native(PS: 操作完如果还是不能提交可以按照第六步重启一下Idea)

最开始没有重启IDEA, 操作完还是不行, 后面重启了一下可以了. 但是后面为了验证是否需要重启IDEA切换了几次, 发现不重启也没问题. 所以如果按照以上步骤仍然没有效果可以重启一下IDEA试试。

第六步: 重启IDEA

以上步骤操作完成, 就可以使用IDEA正常提交代码了

搜索

复制

8、IDEA提交代码出现: Fetch failed fatal: Could not read from remote repository的更多相关文章

  1. Push failed: Failed with error: fatal: Could not read from remote repository.

    GitLab push远端,出现错误提示:Push failed: Failed with error: fatal: Could not read from remote repository. 原 ...

  2. gitlab 拉代码提示:Your Account has been blocked. fatal: Could not read from remote repository. 最佳解决方案

    今天在脚本服务器上拉取代码,突然发现拉不了代码了,提示: GitLab: Your account has been blocked. fatal: Could not read from remot ...

  3. 【git基础】Permission denied (publickey). fatal: Could not read from remote repository

    运行以下git命令的时候出现错误 git push -u origin master error The authenticity of host 'github.com (13.250.177.22 ...

  4. fatal:'origin' does not appear to be a git repository fatal:Could not read from remote repository

    天gitlab中遇到的问题: 当 git push origin branch_name时遇到报错如下: fatal:'origin' does not appear to be a git repo ...

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

  6. git提示错误关于错误:ssh: Could not resolve hostname github.com: Name or service not known.fatal: Could not read from remote repository.

    关于 Git 使用中出现的错误 饥人谷_楠柒 关注 2016.11.02 15:33* 字数 746 阅读 3607评论 5喜欢 10赞赏 1 关于错误:ssh: Could not resolve ...

  7. Permission denied (publickey). fatal: Could not read from remote repository.

    博主在github上下载tiny face的的源代码的时候,遇到git clone命令为:git clone --recursive git@github.com:peiyunh/tiny.git 而 ...

  8. On branch master nothing to commit, working tree clean ERROR: Repository not found. fatal: Could not read from remote repository.

    将gitbash部署hexo到github:hexo deploy 报以下错误: Administrator@liu MINGW64 /Hexo $ hexo d INFO Deploying: gi ...

  9. github下载报错:Permission denied (publickey). fatal: Could not read from remote repository.

    Permission denied (publickey). fatal: Could not read from remote repository. 博主在github上下载tiny face的的 ...

随机推荐

  1. aws-cli命令-ec2实例相关的操作

    aws上可以使用aws-cli的方式管理实例,记录一些常用的操作 1.启动.关闭.终止实例(目前笔者发现只能通过指定实例ID进行管理) # 启动/关闭/重启 指定的实例 aws ec2 start-i ...

  2. 重写 hashcode()真有那么简单嘛?

    万万没想到一个 hashcode() 方法,既然会引出一堆的知识盲区,简直了. 起因: 老八股:为什么重写Equals方法要重写HashCode方法. 大声告诉我为什么,闭着眼睛先把答案背出来,啥?这 ...

  3. vlunhub靶场之EMPIRE: LUPINONE

    准备: 攻击机:虚拟机kali.本机win10. 靶机:EMPIRE: LUPINONE,网段地址我这里设置的桥接,所以与本机电脑在同一网段,下载地址:https://download.vulnhub ...

  4. 作用域通信对象:session用户在登录时通过`void setAttribute(String name,Object value)`方法设置用户名和密码。点击登录按钮后,跳转到另外一个页面显示用户

    作用域通信对象:session session对象基于会话,不同用户拥有不同的会话.同一个用户共享session对象的所有属性.作用域开始客户连接到应用程序的某个页面,结束与服务器断开连接.sessi ...

  5. 解决在vue中设置的height: 100%没有效果

    在新的页面设置height无效果的时候.需要改动App这个文件的heigth 解决办法.给app这个盒子设置高度.默认情况下为0 设置高度100%时,div的高度会等同于其父元素的高度.而上面中id为 ...

  6. 7 步保障 Kubernetes 集群安全

    随着 Kubernetes 的发展和改进,新的安全威胁和风险也逐渐向 K8s 转移,因此 K8s 安全性变得越来越重要,而保护 K8s 集群已成为 DevOps 团队不容忽视的重要任务.K8s 有多种 ...

  7. 【MySQL】Navicat15 安装

    # Navicat安装` 提示`:鉴于之间已经出了MySQL的安装教程,在这了我也讲下,那个其实包含了两个知识点,既可以小白初次安装MySQL客户端,也面向想安装5.x和8.x两个版本的. --- @ ...

  8. Sublime Text4(Build 4126) 安装备忘

    Sublime Text4(Build 4126) 安装备忘 sublime text 4126 PJ已测可用 打开浏览器进入网站https://hexed.it 打开sublime text4安装目 ...

  9. vulnhub靶场之NOOB: 1

    准备: 攻击机:虚拟机kali.本机win10. 靶机:NOOB: 1,网段地址我这里设置的桥接,所以与本机电脑在同一网段,下载地址:https://download.vulnhub.com/noob ...

  10. 系统整理K8S的配置管理实战-建议收藏系列

    目录 一.ConfigMap 1.1.创建 1.1.1.from-file 1.1.2.from-env-file 1.1.3.from-literal 1.1.4.基于yaml文件创建 1.2.Po ...