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 而 ...
随机推荐
- 【转载】C#中List集合使用LastIndexOf判断元素最后一次出现的索引位置
在C#的List集合操作中,有时候需要判断元素对象在List集合中第一次出现的索引位置信息,此时需要使用到List集合的IndexOf方法来判断,如果元素存在List集合中,则IndexOf方法返回所 ...
- 英语dyamaund钻石
dyamaund 英文词汇,中文翻译为金刚石的;镶钻;用钻石装饰 中文名:镶钻;钻石装饰 外文名:dyamaund 目录 释义 dyamaund 读音:[ˈdaɪəmənd, ˈdaɪmənd] ...
- java实现mysql数据备份
/** * @param hostIP ip地址,可以是本机也可以是远程 * @param userName 数据库的用户名 * @param password 数据库的密码 * @param sav ...
- React: webpack模块组织关系
现代前端开发离不开打包工具,以 webpack 为代表的打包工具已经成为日常开发必备之利器,拿 React 技术栈为例,我们 ES6 形式的源代码,需要经过 webpack 和 Babel 处理,才能 ...
- myEclipse项目部署点击Finish按钮没反应
-- 问题描述:myEclipse项目部署点击Finish按钮没反应. -- 问题原因:Tomcat没有不熟JDK. -- 解决办法:window->preferences->servic ...
- CI框架扩展系统类库
CI框架不支持像yii2框架那样,可以直接在controllers下创建CommonController并继承父类,那么我们想要做登录控制或权限控制时,直接在父类控制器操作是不合理的. 这时比较方便的 ...
- ubuntu 下 VNC Viewer 通过网线连接树莓派的网络设置
1 本机环境 Ubuntu 19.10 Raspberry 3B+ (Raspbian.开启了 vnc 服务) 2 Ubuntu 网络设置 1. Identity 下选择 Mac Address(如: ...
- vsftpd配置文件
一.默认配置 1. 允许匿名用户和本地用户登录 anonymous_enable=YES local_enable=YES 2. 匿名用户使用的登录名为ftp或anonymous,密码为空:匿名用户不 ...
- 用session防止网站页面被频繁刷新
session防止网站页面频繁被刷新 <?php //公司网站老是受到攻击,这是之前在网上看到的一个用session防止IP频繁访问的方法,我们公司用的是Memcache,都差不多,就是存储方式 ...
- Codeforces H. Malek Dance Club(找规律)
题目描述: Malek Dance Club time limit per test 1 second memory limit per test 256 megabytes input standa ...