备份整个blog文件夹(除 node_modules 文件夹以及一些临时文件)
在新设备上安装 node.js 、npm、git
使用npm全局安装hexo
在博客文件夹下执行
npm install
安装依赖配置ssh密钥
ssh-keygen -t rsa -C "[email protected]"
生成密钥后复制内容粘贴到代码托管网站的个人密钥设置中 github>settings>SSH and GPG keys>New SSH key设置git全局身份
git config --global user.name "your user name"
git config --global user.email "[email protected]"
定位到备份下来的blog文件夹,执行hexo d部署尝试,可能会遇到以下错误提示:
“Warning: Permanently added the RSA host key for IP address 'i.p.i.p' to the list of known hosts.”
并会询问是否仍要建立连接(yes/no) yes 就可以了
hexo设备迁移
- 本文链接:https://krau.top/posts/hexo-devices-migrate
- 版权声明:本博客所有文章除特别声明外,均默认采用 CC BY-NC-SA 许可协议。