PicList + Cloudflare R2 + Obsidian + Git 双端同步

2026-01-31

01.准备工作

工具

02.Obsdian配置git自动同步

1.Windows端

  1. 创建一个github私有仓库

  2. 配置 SSH 密钥

ssh-keygen -t ed25519 -C "github邮箱"
cat ~/.ssh/id_ed25519.pub
  1. 登录 GitHub

    • 点击右上角头像 -> Settings

    • 在左侧菜单找到 SSH and GPG keys

    • 点击右上角的 New SSH key

    • Title

    • Key

    • 点击 Add SSH key

  2. 测试是否成功

ssh -T git@github.com
  1. 获取仓库的 SSH 地址

  2. VS Code 中执行克隆

git clone git@github.com:mistn/test_vault.git
  1. 创建.gitignore
.obsidian/workspace.json
.obsidian/workspace-mobile.json
  1. 推送到github仓库
git push origin main

测试成功

  1. Obsidian自动同步插件

    • Obsidian搜索git

    • 停止编写一分钟后自动同步

    • 启动时自动拉取

2.Android端

  1. 数据线连接手机选择传输文件

  2. 直接复制Obsidian仓库到手机

  3. 手机端Obsidian打开文件夹

  4. git配置

    • 打开git插件填写用户名和邮箱

    • 配置personal access token

      • 打开github

      • 选择No expiration

      • 勾选repo

      • 填写token

03.Cloudflare R2图床配置

1.创建存储桶 (Bucket)

  • 登录 Cloudflare 控制台,在左侧菜单点击 “存储与数据库” -> “R2”

  • 点击 “创建存储桶” (Create Bucket)

2.获取 API 凭据 (密钥)

  • 在 R2 概览页面,点击右上角的 “管理 R2 API 令牌” (Manage API Tokens)

  • 点击 “创建 API 令牌”,权限选择 “对象读写” (Object Read & Write)

  • 手动保存

      • Access Key ID (访问密钥 ID)
    • Secret Access Key (机密访问密钥)

    • Endpoint(终结点 URL)

3.开启公共访问

连接域绑定子域名

04.PicList 中配置 R2

1.安装s3-lls插件

2.依次填写

3.图床设置

  • 高级重命名

    {Y}{m}{d}{h}{i}{s}{str-6}
  • 移除Exif信息

  • 转换格式webp,压缩质量85%

  • piclist同步配置到github仓库

4.image auto upload 插件

图片描述改为无

mousewheel image zoom 插件

可以鼠标调整图片大小