Oct1a

hexo部署至Git遇到的坑

TypeError: Cannot set property ‘lastIndex’ of undefined

解决方法:把hexo 主题中的**_config.yml中的高亮插件 auto_detect 设置为false**

highlight:
  enable: true
  line_number: true
  auto_detect: false
  tab_replace:

命令 git branch 的错误

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

git init 的错误

使用

install hexo-deployer-git --save```

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:

解决方法:更新 npm 版本即可,执行如下命令

npm i npm -g

fatal: unable to access ‘https://xxx: error setting certificate verify locations

解决方法

先打开git bash窗口
执行命令:


git config –system http.sslcainfo “C:\Program Files (x86)\git\bin\curl-ca-bundle.crt”1

(注意修改为正确的文件路径)或


git config –system http.sslverify false1

我使用 git config --system http.sslverify false 命令解决问题。

参考文章

Github: error cloning my private repository

hexo d 把整个目录都给提交上去了

解决方法:删除根目录的 ** .git ** 文件夹

因为进行了git init操作

hexo d 提交不上去 nothing to commit,working tree clean

测试Git连通 ```ssh -T git@github.com

```
id_rsa.pub 内的key复制到账户设置key 中,不是复制在项目设置内

本作品采用 知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议 进行许可。