hexo g报错Please make sure you have the correct access rights解决

这里其实也是很清楚的提示【请确保您拥有正确的访问权限】所以这里是权限的问题

 

首先我们先看一下我使用了 [hexo d]的命令后的错误提示

he file will have its original line endings in your working directory
On branch master
nothing to commit, working tree clean
ssh: Could not resolve hostname YourName(这个是你的用户名): Name or service not known
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: Spawn failed
    at ChildProcess.<anonymous> (E:\myblog\sxxc\node_modules\hexo-util\lib\spawn.js:52:19)
    at ChildProcess.emit (events.js:198:13)
    at ChildProcess.cp.emit (E:\myblog\sxxc\node_modules\cross-spawn\lib\enoent.js:40:29)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)

看到这里我需要强调一点,这篇文章时需要你已经建立好了hexo+GitHub一段时间后再使用出现的以上错误

还有请一定注意,网上也有很多的解决方法,但是大多数都是说,你应该在你的博客文件下打开【git bash】也就是你的命令行

好了我们开始解决,开始我以为是公钥私钥的问题,我重新生成了(其实是没有必要的,你已经配置好的秘钥是不需要重新配置单额)

费了好多的周折终于找到了原因,这里错误提示的权限问题,其实就是连接不上而已,
最开始建立的时候我使用的hexo2.0,现在已经升级到3.8.0(也不知道啥时候升级到额)

这里请使用[hexo v]来查看你的版本信息

$ hexo v
hexo: 3.8.0
hexo-cli: 2.0.0
os: Windows_NT 10.0.17763 win32 x64
http_parser: 2.8.0
node: 10.16.0
v8: 6.8.275.32-node.52
uv: 1.28.0
zlib: 1.2.11
brotli: 1.0.7
ares: 1.15.0
modules: 64
nghttp2: 1.34.0
napi: 4
openssl: 1.1.1b
icu: 64.2
unicode: 12.1
cldr: 35.1
tz: 2019a

如果你的版本是2.X.X那么好了对口味,来我博客看https://suxiexingchen.github.io/2020/03/13/34/看详细的解决吧。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值