linux 环境部署 hexo
背景
试图完成在 Deepin 上的 hexo 更新与上传
步骤
1、安装 Git
参考
https://git-scm.com/download/linux
对于 Deepin 系统,我使用这个命令
1 | apt-get install git |
配置 git
git config username
1 | git config --global user.name "用户名" |
2、安装 nodejs 和 npm
参考
https://blog.csdn.net/fengjinghong/article/details/122923587
1 |
|
3、安装 pandoc
参考
https://blog.csdn.net/weixin_44375591/article/details/104005570
1 | sudo apt-get install pandoc |
4、安装 picGo
https://github.com/Molunerfinn/PicGo/releases
选择Applmage后缀的版本
下载完双击运行程序并配置
5、安装 Typroa
参考
https://blog.csdn.net/weixin_42905141/article/details/124071137
1 | tar xzvf Typora-linux-x64.tar.gz |
6、添加 rsa 密钥
1 | ssh-keygen -t rsa -b 4096 -C "your_email@example.com" |
7、部署 hexo
1 | npm install -g hexo-cli |
问题
git ·push 时出现问题
1 | fatal:Authentication failed for‘https://git ... |
原因:
github 政策改变,在填写 password 时要使用 token
https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls
https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
但是使用 https 协议每次都要输入 token
改为 ssh 传输
参考
https://blog.csdn.net/qq_41726670/article/details/124389683
查看现在使用什么协议传输
1 | git remote -v |
可以看出来使用了 https 协议
修改为 ssh 传输(前提事先生成 ssh 密钥)
1 | git remote set-url origin git@github.com:用户名/仓库 |
附
5 、Typroa linux
6、PicGo linux


