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

╰+哭是因爲堅強的太久メ 2023-07-14 10:52 104阅读 0赞

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

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

  1. he file will have its original line endings in your working directory
  2. On branch master
  3. nothing to commit, working tree clean
  4. ssh: Could not resolve hostname YourName(这个是你的用户名): Name or service not known
  5. fatal: Could not read from remote repository.
  6. Please make sure you have the correct access rights
  7. and the repository exists.
  8. FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
  9. Error: Spawn failed
  10. at ChildProcess.<anonymous> (E:\myblog\sxxc\node_modules\hexo-util\lib\spawn.js:52:19)
  11. at ChildProcess.emit (events.js:198:13)
  12. at ChildProcess.cp.emit (E:\myblog\sxxc\node_modules\cross-spawn\lib\enoent.js:40:29)
  13. at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)

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

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

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

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

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

  1. $ hexo v
  2. hexo: 3.8.0
  3. hexo-cli: 2.0.0
  4. os: Windows_NT 10.0.17763 win32 x64
  5. http_parser: 2.8.0
  6. node: 10.16.0
  7. v8: 6.8.275.32-node.52
  8. uv: 1.28.0
  9. zlib: 1.2.11
  10. brotli: 1.0.7
  11. ares: 1.15.0
  12. modules: 64
  13. nghttp2: 1.34.0
  14. napi: 4
  15. openssl: 1.1.1b
  16. icu: 64.2
  17. unicode: 12.1
  18. cldr: 35.1
  19. tz: 2019a

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

发表评论

表情:
评论列表 (有 0 条评论,104人围观)

还没有评论,来说两句吧...

相关阅读