转载自

第一步、确认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. BinaryBombs(二进制炸弹实验)

    实验介绍 使用所学知识拆除Binary Bombs来增强对程序的机器级表示.汇编语言.调试器和逆向工程等理解. Binary Bombs(二进制炸弹)是一个可执行程序,是C语言编译链接成的,包含pha ...

  2. WindivertDotnet快速发Ping

    1 前言 WindivertDotnet是面向对象的WinDivert的dotnet异步封装,其提供如下的发送数据方法: ValueTask<int> SendAsync( WinDive ...

  3. 常用Linux命令(常年更新)

    Linux后台运行脚本: nohup python -u test.py > out.log 2>&1 & nohup sh **.sh > /dev/null 2& ...

  4. 关于Docker的一些事--Docker-Compose 升级版本

    起源 近来一直在研究怎么搭建自己的私有网盘,本着虚心耐心,认真求是态度,开始做起了实验,最终种草了Nextcloud这款开源网盘,然而用私人的服务器感觉很卡,故转战到了一个基友的服务器,感觉非常吊! ...

  5. mybatis一对多根据条件查询的查条数

    一对多写了mapper映射之后 根据条件查条数 可以根据主表的唯一id进行分组 在拿到它的count select count(0) over(aa.id),,id,name,age from tab ...

  6. 第2-3-8章 分片上传和分片合并的接口开发-文件存储服务系统-nginx/fastDFS/minio/阿里云oss/七牛云oss

    目录 5.10 接口开发-分片上传 5.10.1 分片上传介绍 5.10.2 前端分片上传插件webuploader 5.10.3 后端代码实现 5.10.3.1 接口文档 5.10.3.2 代码开发 ...

  7. (工具) 性能测试基准软件 lmBench (待补充)

    1. lmBench 介绍 Lmbench是一套简易,可移植的,符合ANSI/C标准为UNIX/POSIX而制定的微型测评工具.一般来说,它衡量两个关键特征:反应时间和带宽.Lmbench旨在使系统开 ...

  8. Vue使用axios请求接口返回成功200但是进入到catch中

    发生这个问题时查阅了许多资料,没有一个是对得上的.最后发现原来是在请求拦截器中的错误 错误代码如下 // 添加响应拦截器 axios.interceptors.response.use(functio ...

  9. ValueError: Detected newline in header value. This is a potential security problem

    原因 flask框架进行重定向的url中包含 换行符\n或\r 解决方法 使用 strip() 函数去除行首或行尾的换行符(如果你url中间包含这些符号replace函数替换, 但是如果中间包含只能说 ...

  10. 【Shell案例】【!~//、grep反向查找、sed流编辑器】13、去掉所有包含this的句子

    描述写一个 bash脚本以实现一个需求,去掉输入中含有this的语句,把不含this的语句输出示例:假设输入如下:that is your bagis this your bag?to the deg ...