1. 程式人生 > 其它 >github+hexo部落格

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 "[email protected]"
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 "[email protected]"

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

第一個就是你的郵箱,第二個就是你的使用者名稱
再輸入hexo d就可以了

哈哈