github+hexo博客

搭建视频:【2021最新版】保姆级Hexo+github搭建个人博客_哔哩哔哩_bilibili

创建博客时要在空文件夹中创建,不然会报错

下载插件时:

 npm install hexo-deployer-git --save

一度以为自己出错了,实际上没错

然后hexo d上传时一直出错:网上找了很多都没找到解决方法,最后还是这篇文章解决了,天不亡我

hexo搭建错误之Spawn-Failed-窝四腻蝶 (gitee.io)

D:\blog>hexo d
INFO Deploying: git
INFO Clearing .deploy_git folder...
INFO Copying files from public folder...
INFO Copying files from extend dirs...
warning: LF will be replaced by CRLF in 2020/04/27/hello-world/index.html.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in 2020/04/27/我的第一篇博客文章/index.html.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in archives/2020/04/index.html.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in archives/2020/index.html.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in archives/index.html.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in css/style.css.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in fancybox/helpers/jquery.fancybox-buttons.css.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in fancybox/helpers/jquery.fancybox-buttons.js.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in fancybox/helpers/jquery.fancybox-media.js.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in fancybox/helpers/jquery.fancybox-thumbs.css.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in fancybox/helpers/jquery.fancybox-thumbs.js.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in fancybox/jquery.fancybox.css.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in fancybox/jquery.fancybox.js.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in fancybox/jquery.fancybox.pack.js.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in index.html.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in js/script.js.
The file will have its original line endings in your working directory

*** Please tell me who you are.

Run

git config --global user.email "you@example.com"
git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'lenovo@¶àÀÍŶ.(none)')
error: src refspec HEAD does not match any
error: failed to push some refs to 'https://github.com/210173313/210173313.gethub.io.git'
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
Error: Spawn failed
at ChildProcess.<anonymous> (D:\blog\node_modules\_hexo-util@1.9.0@hexo-util\lib\spawn.js:51:21)
at ChildProcess.emit (events.js:310:20)
at ChildProcess.cp.emit (D:\blog\node_modules\_cross-spawn@7.0.2@cross-spawn\lib\enoent.js:34:29)
at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)

这段报错的意思就是你的账户默认标识
你只要输入

D:\blog>git config --global user.email "210173313@qq.com"

D:\blog>git config --global user.name "210173313"

第一个就是你的邮箱,第二个就是你的用户名
再输入hexo d就可以了

哈哈

posted @ 2022-03-13 15:37  wzc6  阅读(56)  评论(0)    收藏  举报