【Hexo】deploy出错的解决方法
阅读原文时间:2023年07月09日阅读:1

、ERROR Deployer not found: git

执行npm install hexo-deployer-git --save

、$ hexo d
INFO Deploying: git
INFO Clearing .deploy_git folder…
INFO Copying files from public folder…
fatal: Not a git repository (or any of the parent directories): .git
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Error: fatal: Not a git repository (or any of the parent directories): .git

at ChildProcess.<anonymous> (E:\\web\\Hexo\\node\_modules\\hexo-util\\lib\\spawn.js::)  
at emitTwo (events.js::)  
at ChildProcess.emit (events.js::)  
at ChildProcess.cp.emit (E:\\web\\Hexo\\node\_modules\\cross-spawn\\lib\\enoent.js::)  
at maybeClose (internal/child\_process.js::)  
at Socket.<anonymous> (internal/child\_process.js::)  
at emitOne (events.js::)  
at Socket.emit (events.js::)  
at Pipe.\_handle.close \[as \_onclose\] (net.js::)  

FATAL fatal: Not a git repository (or any of the parent directories): .git

Error: fatal: Not a git repository (or any of the parent directories): .git

at ChildProcess.<anonymous> (E:\\web\\Hexo\\node\_modules\\hexo-util\\lib\\spawn.js::)  
at emitTwo (events.js::)  
at ChildProcess.emit (events.js::)  
at ChildProcess.cp.emit (E:\\web\\Hexo\\node\_modules\\cross-spawn\\lib\\enoent.js::)  
at maybeClose (internal/child\_process.js::)  
at Socket.<anonymous> (internal/child\_process.js::)  
at emitOne (events.js::)  
at Socket.emit (events.js::)  
at Pipe.\_handle.close \[as \_onclose\] (net.js::)

配置Deployment首先,你需要为自己配置身份信息,打开命令行,然后输入:

  • git config --global user.name "yourname"
  • git config --global user.email "youremail"

.以上做完还不行

删掉根目录下的文件夹:.deploy_git,重新deploy就可以了。

以上是在SSH配置好的前提下

手机扫一扫

移动阅读更方便

阿里云服务器
腾讯云服务器
七牛云服务器