hexo_异常处理

warning: LF will be replaced by CRLF

Git 可以在你提交时自动地把回车(CR)和换行(LF)转换成换行(LF),而在检出代码时把换行(LF)转换成回车(CR)和换行(LF)。 你可以用git config --global core.autocrlf true 来打开此项功能。 如果是在 Windows 系统上,把它设置成 true,这样在检出代码时,换行会被转换成回车和换行:

1
2
#提交时转换为LF,检出时转换为CRLF
$ git config --global core.autocrlf true

error:spawn failed…

  1. 删除.deploy_git文件夹;

  2. 输入git config --global core.autocrlf false

  3. 然后,依次执行:
    hexo clean
    hexo g
    hexo d

  4. 或者:修改_config.yml配置文件:

    deploy:

    type: git

    repo: https://github.com/yourname/yourname.github.io.git

    branch: master

    其中的repo修改为

    git@github.com:yourname/yourname.github.io.git

Validating config

1
2
3
4
5
6
npm un hexo-deployer-git 
npm i hexojs/hexo-deployer-git

hexo clean
hexo g
hexo d

fatal: unable to access “https://…”: OpenSSL SSL_read: Connection was reset, errno 10054

1、可能用户名及邮箱错误,重新配置

查看用户名及邮箱

1
2
git config user.name
git config user.email

修改用户名、邮箱

1
2
git config --global user.name "xxx"
git config --global user.email "xxx"

移除仓库,重新添加

1
2
git remote rm origin
git remote add origin https://github.com/XXX

2、修改解除SSL认证。

在Git Bash中输入以下命令:

1
git config --global http.sslVerify "false"

3、文件体积太大

改为500MB,在Git Bash中输入以下命令:

1
git config http.postBuffer 5242880003

4、更新DNS缓存

在cmd中输入以下命令:

1
ipconfig /flushdns