用Picgo+Gitee打造私人图床

23.4.26更新:Gitee已经开启防盗链,无法作为图床使用

安装picgo

官网:https://github.com/Molunerfinn/PicGo

官方文档:https://picgo.github.io/PicGo-Doc/zh/guide/#picgo-is-here

官方提供安装源:

下载源 地址/安装方式 平台 备注
GitHub Release https://github.com/Molunerfinn/PicGo/releases All 国内下载速度可能会慢
腾讯云COS(opens new window) https://github.com/Molunerfinn/PicGo/releases 附在更新日志结尾 All 感谢 腾讯云COS (opens new window)提供的赞助支持
山东大学镜像站(opens new window) https://mirrors.sdu.edu.cn/github-release/Molunerfinn_PicGo All 感谢 山东大学镜像站 (opens new window)提供的镜像支持
Scoop(opens new window) scoop bucket add helbing https://github.com/helbing/scoop-bucket & scoop install picgo Windows 感谢 @helbing 的贡献
Chocolatey(opens new window) choco install picgo Windows 感谢 @iYato 的贡献
Homebrew(opens new window) brew install picgo --cask macOS 感谢 @womeimingzi11 的贡献
AUR(opens new window) yay -S picgo-appimage Arch-Linux 感谢 @houbaron 的贡献

如果显示已损坏,打开终端输入这个,然后从应用程序里把picgo拖进去,回车,输入密码,再回车即可。

1
sudo xattr -rd com.apple.quarantine

image-20230425114831142

设置gitee

新建仓库

image-20230425115206109

仓库创建好了之后,点击头像进入个人主页,然后 头像 - 设置 - 私人令牌

image-20230425115836549

页面右上角,点击“生成新令牌”,只需要给到以下权限即可。

image-20230425115948528

点击提交之后,会生成私人令牌,记得保存好令牌,因为以后再也看不到这个key了

image-20230425120019114

设置PicGo

打开PicGo - 插件设置,搜索github-plus

image-20230425144421199

图床设置如下

image-20230425151139650

repo:{用户名}/{仓库名}

branch:看个人选择

token:个人令牌token

path:如果放根目录就不填,放文件夹填文件夹

customUrl:看个人选择填写

origin:选“gitee”

注意repo这里!用户名不是你的昵称,所以不能用页面上显示的。

最好是去到管理页面,看路径!路径里的才是正确的

image-20230425145014378

填写完以后,点击“确定”,然后点击“设置默认图床”,即可正常使用Picgo搭配Gitee作为图床。