0X01 GitHub中创建仓库
在这里插入图片描述
名称这里随意,然后打开头像点击Settings–>Developer Settings–>Personal access Settings–>Generate new token
这里我选的是 No expiration Token 是没有结束时间的
然后在mac 中
brew install node
npm install picgo
picgo set uploader 然后选择github
这里设置的时候
1. github用户名/仓库名
2. repo填master
3. token这里填刚刚配置的token
4. path 这里我配置的img 填 img/ (没有这个文件的话上传的时候也会自动创建的)
5. customUrl 这里配置一下CDN的 https://cdn.jsdelivr.net/gh/github用户名/仓库名
完成后
picgo use uploader 选择github
which picgo
which node 这两个typora配置中会用到
Typora 设置成
上传服务中的命令刚刚得到的 【node路径 picgo路径 upload】格式
如果粘贴图片报erro, 可以把上传服务改为PicGo-Core,然后粘贴一下图片试试能不能上传,否则可能就是前面配置的时候有些地方写错了。