网上方法参差不一,我直接简单粗暴法
备份整个blog文件夹(可以事先清理一下垃圾文件以减小体积)
在新设备上安装 node.js 、npm、git
使用npm安装hexo
配置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就完事