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/看詳細的解決吧。

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