欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

【Hexo】Spawn failed fatal: LF would be replaced by CRLF

程序员文章站 2022-07-06 21:42:19
...
fatal: LF would be replaced by CRLF in 2019/06/21/hello-world/index.html
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\Hexo\node_modules\hexo-util\lib\spawn.js:52:19)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at ChildProcess.cp.emit (D:\blog\Hexo\node_modules\cross-spawn\lib\enoent.js:40:29)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)

折磨了我4天的问题,结果我一直搜的是 Error: Spawn failed at ChildProcess. ,搜了N多方法,无效。昨晚查了下老错误“fatal: LF would be replaced by CRLF”
在.git文件夹下打开config配置文件,添加上下面两句话:
autocrlf = false
safecrlf = false

[core]
	repositoryformatversion = 0
	filemode = false
	bare = false
	logallrefupdates = true
	symlinks = false
	ignorecase = true
	autocrlf = false
	safecrlf = false

问题解决,真是人生处处有惊喜,果然还是不该在同一棵树上吊,要多试几棵树。

相关标签: Hexo