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/看详细的解决吧。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章