惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
L
LangChain Blog
H
Help Net Security
博客园_首页
T
Tailwind CSS Blog
Microsoft Security Blog
Microsoft Security Blog
T
The Blog of Author Tim Ferriss
雷峰网
雷峰网
Recent Announcements
Recent Announcements
D
DataBreaches.Net
U
Unit 42
Vercel News
Vercel News
I
InfoQ
Martin Fowler
Martin Fowler
Microsoft Azure Blog
Microsoft Azure Blog
Apple Machine Learning Research
Apple Machine Learning Research
S
SegmentFault 最新的问题
Jina AI
Jina AI
博客园 - 叶小钗
博客园 - 【当耐特】
罗磊的独立博客
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
月光博客
月光博客
Last Week in AI
Last Week in AI

eallion's Blog

春假清明自驾游 Ubuntu 25.10 安装和配置 秋假 彩礼 2025 博客变化 预制菜 联邦礼仪之一 重拾写博客的乐趣 少儿 TED - 时间管理大师 n8n 之同步博客到 Mastodon n8n 之备份 Mastodon 嘟文 如何备份 Mastodon Docker 部署 Mastodon NAS 折腾记 Windows 11 安装软件 博客排版 - 挤压中文标点符号 Hugo 博客集成 Mastodon 独立博客自省问卷 15 题 Chrome 插件更新:网址净化器 在 Hugo 中使用 Shiki 炒菜万能公式 uBlacklist 订阅合集 读《中文互联网正在加速崩塌》 CSS 和 JS 实现博客热力图 受灾小记 那,他吃什么?! Mastodon 同步到 Memos Hugo 外部链接跳转提示页面 联邦宇宙及 Mastodon 简介 2024 博客变化
Gridea Hexo Hugo 等 git push 同步到多个仓库
Charles Chin · 2019-12-17 · via eallion's Blog

以 GitHub Pages + Coding Pages 为例

# 准备工作

  • 创建 GitHub Pages 仓库
  • 创建 Coding Pages 仓库
  • 申请 GitHub token
  • 申请 Coding token 访问令牌
  • 如果是 Gridea,在 Gridea APP 里配置好 GitHug Pages

# 配置 git remote

  • 如果是 Gridea 需要在 output 设置
cd ~/Documents/Gridea/output
  • 如果是 Hexo Hugo 等,在博客根目录即可。

然后输入以下命令:

git remote set-url --add --push origin https://github.com/eallion/gridea.git
git remote set-url --add --push origin https://e.coding.net/eallion/gridea.git

输入:git remote -v,如果有如下提示,即有 2 条 (push) 代码,则说明配置正确:

# DNS 解析

解析 CNAME 的时候,国内的解析到 Coding Pages,国外的解析到 Git Pages.

如下图所示:

# 同步

配置好后,正常同步即可。

# 其他注意事项

如果开启了 https,但是 Let’s Encrypt 证书只有 3 个月的有效时间,到时候关系到续期的问题,续期的时候需要暂停解析,如续期 Git Pages 的证书,就暂停 Coding Pages 的解析,反之一样。不过感觉上还是比较麻烦的。还有其他可选方案的。还有个原因是 Git Pages 的证书是 60 天更新一次,而 Coding 的证书是 80 天更新一次。