coneycode / hexo-git-backup

you can use it to backup your blog into git.
MIT License
458 stars 66 forks source link

ERROR Plugin load failed: hexo-backup #23

Open changchichung opened 6 years ago

changchichung commented 6 years ago

looks like the hexo backup works , but always generate the error below

chchang@ubuntu1804hexo:~/hexo$ sudo hexo b
(node:17334) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
ERROR Plugin load failed: hexo-backup
Error: Cannot find module './build/Release/shell'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/chchang/hexo/node_modules/execSync/index.js:30:11)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (/home/chchang/hexo/node_modules/hexo/lib/hexo/index.js:216:21)
    at /home/chchang/hexo/node_modules/hexo-backup/index.js:2:11
    at /home/chchang/hexo/node_modules/hexo/lib/hexo/index.js:232:12
    at tryCatcher (/home/chchang/hexo/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/chchang/hexo/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/home/chchang/hexo/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/home/chchang/hexo/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/home/chchang/hexo/node_modules/bluebird/js/release/promise.js:693:18)
    at Promise._fulfill (/home/chchang/hexo/node_modules/bluebird/js/release/promise.js:638:18)
    at Promise._resolveCallback (/home/chchang/hexo/node_modules/bluebird/js/release/promise.js:432:57)
    at Promise._settlePromiseFromHandler (/home/chchang/hexo/node_modules/bluebird/js/release/promise.js:524:17)

INFO  Start backup: git
On branch master
Your branch is ahead of 'github/master' by 2 commits.
  (use "git push" to publish your local commits)

nothing to commit, working tree clean
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
INFO  Backup done: git
INFO  Total precache size is about 16.3 MB for 539 resources.

any suggestions ??

coneycode commented 5 years ago

git@github.com: Permission denied (publickey). 你应该先把本机的ssh public key加到github中,或者你使用https通道

coneycode commented 5 years ago

话说你这个报错是怎么回事?我这边没复现成功,我再试试。。能说下你的hexo版本么?hexo -v打出来看看。

caixiaomo1993 commented 5 years ago

话说你这个报错是怎么回事?我这边没复现成功,我再试试。。能说下你的hexo版本么?hexo -v打出来看看。

(node:55236) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.

... hexo: 3.8.0 hexo-cli: 1.1.0 os: Darwin 17.7.0 darwin x64 http_parser: 2.7.0 node: 8.10.0 v8: 6.2.414.50 uv: 1.19.1 zlib: 1.2.11 ares: 1.10.1-DEV modules: 57 nghttp2: 1.25.0 openssl: 1.0.2n icu: 60.1 unicode: 10.0 cldr: 32.0 tz: 2017c

我遇到了同样的问题,请问应该如何解决呢?这个备份插件对我来说还挺重要的 :) 已经试过了 sudo npm update -g 还是不行

coneycode commented 5 years ago

这个应该是git没权限的问题。

  1. hexo b的配置中,git的地址辛苦粘出来一下~
  2. 在终端里输入 ssh -T git@github.com命令试试什么反馈。