git之fatal: Could not read from remote repository
问题背景:
在git bash中使用hexo g -d命令进行文章发布
详细错误信息:
fatal: Could not read from remote repository. Please make sure you have the correct access rights
and the repository exists.
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Error: Connection reset by 13.250.177.223 port 22
fatal: Could not read from remote repository. Please make sure you have the correct access rights
and the repository exists. at ChildProcess.<anonymous> (E:\Hexo\node_modules\hexo-util\lib\spawn.js:37:17)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at ChildProcess.cp.emit (E:\Hexo\node_modules\cross-spawn\lib\enoent.js:40:29)
at maybeClose (internal/child_process.js:915:16)
at Socket.stream.socket.on (internal/child_process.js:336:11)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at Pipe._handle.close [as _onclose] (net.js:561:12)
错误原因是因为ssh key有问题,连接不上服务器。
于是我参考如下链接,一步一步操作,最终解决了这个问题:
git遇到的问题之“Please make sure you have the correct access rights and the repository exists.”
虽然已经有了问题的解决答案,但是我觉得还是需要列举一下相关步骤,梳理一下:
1.重新在git设置一下身份的名字和邮箱
git config --global user.name "yourname" git config --global user.email "your@email.com"
这里的yourname必须与github的用户名一致
这里your@email.com必须与github登录邮箱一致
2.删除.ssh文件夹下的known_hosts文件(该文件主要作用是域名解析)
3.ssh-keygen -t rsa -C “your@email.com(填写github对应的邮箱)”
一路回车即可,无需输入
4.进入github设置界面

新增SSH key将id_rsa.pub内容添加到如图中的Key上(title可任意命名):

5.最后完美解决这个问题
git之fatal: Could not read from remote repository的更多相关文章
- 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 ...
- 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 ...
- 用ssh进行git clone出现 fatal: Could not read from remote repository.
问题:在通过MobaXterm进行ssh连接的服务器上用ssh进行git clone出现 fatal: Could not read from remote repository. 解决方法:prox ...
- gitlab 安装遇到 fatal:does not appear to be a git repository fatal: Could not read from remote repository. 问题
Cloning into 'door_lock_bsp'... git@192.168.1.5's password: fatal: 'door_lock/door_lock_bsp.git' do ...
- 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 ...
- 【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 ...
- git clone ssh 时出现 fatal: Could not read from remote repository
一.问题及解决办法参考: 在 ubuntu 中,要把 GitHub 上的储存库克隆到计算机上时,执行如下命令: git clone git@github.com:USER-NAME/REPOSITOR ...
- github Permission denied (publickey). fatal: Could not read from remote repository.
github Permission denied (publickey).fatal: Could not read from remote repository. ----------------- ...
- Permission denied (publickey). fatal: Could not read from remote repository.
博主在github上下载tiny face的的源代码的时候,遇到git clone命令为:git clone --recursive git@github.com:peiyunh/tiny.git 而 ...
随机推荐
- electron-vue多显示屏下将新窗口投放是其他屏幕
display对象可以获取所有显示屏此处演示程序启动是投放新窗口至另一屏幕 import { app, BrowserWindow } from 'electron' const electron = ...
- Falsk框架 Session 与 Flask-Session
目录 Cookie 与 Session 简单了解 Falsk 中 Session 的保管机制 相关的配置 使用 Flask-Session 三方组件 基础练习题 Cookie 与 Session 简单 ...
- The Middle English word was Affrike非洲
Africa (n.) Latin Africa (terra) "African land, Libya, the Carthaginian territory, the province ...
- Git版本管理工具使用
1.Git简介 Git(读音为/gɪt/.)是一个开源的分布式版本控制系统,可以有效.高速地处理从很小到非常大的项目版本管理. Git 是 Linus Torvalds 为了帮助管理 Linux 内核 ...
- Python使用numpy进行数据转换
一.测试数据 二.代码实现 # -*- coding: utf-8 -*- """ Created on Sun Jul 7 11:35:01 2019 加载数据时对指定 ...
- docker 安装prometheus
使用到的命令: [root@lgswork ~]# docker search prometheus NAME DESCRIPTION STARS OFFICIAL AUTOMATED prom/pr ...
- mysql多实例启动过程
单机多实例,是基本的测试环境 01.myslq提供单机管理多节点 02.启动mysql多实例 03.观察进程
- win7彻底卸载VS2015
C盘越来越臃肿,VS2013.VS2015.VS2017以及VS2019都安装的情况下,C盘没有空间了. 系统:Win7 卸载办法: 管理员方式进cmd,执行vs_professional.exe / ...
- C++(四十八) — string容器的基本操作
参考博客:https://blog.csdn.net/qq_37941471/article/details/82107077 https://www.cnblogs.com/danielStudy/ ...
- The Shortest Statement(Educational Codeforces Round 51 (Rated for Div.2)+最短路+LCA+最小生成树)
题目链接 传送门 题面 题意 给你一张有\(n\)个点\(m\)条边的联通图(其中\(m\leq n+20)\),\(q\)次查询,每次询问\(u\)与\(v\)之间的最短路. 思路 由于边数最多只比 ...