解决 hexo init 失败问题
问题描述
准备使用 hexo 搭建个人博客,执行 hexo init 后失败,错误内容为:
INFO Cloning hexo-starter https://github.com/hexojs/hexo-starter.git
fatal: unable to access ‘https://github.com/hexojs/hexo-starter.git/’: Failed to connect to github.com port 443 after 21080 ms: Timed out
WARN git clone failed. Copying data instead
FATAL Something’s wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
Error: EPERM: operation not permitted, mkdir ‘E:’
解决办法一:
配置npm淘宝镜像
淘宝镜像是指淘宝提供的一个软件源,可以用于下载和安装各种软件包。为什么需要安装淘宝镜像呢?因为在国内,访问国外的软件源速度很慢,而淘宝镜像是国内的,下载速度快,可以提高软件安装的效率。打开 cmd 运行如下命令:
npm config set registry https://registry.npmmirror.com
解决办法二:
科学上网
解决办法大多都是科学上网,对于我这种没有梯子的人来说就有点绝望了我们大多数人来讲还是选择第一种解决办法