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

推荐订阅源

The GitHub Blog
The GitHub Blog
A
About on SuperTechFans
The Cloudflare Blog
G
Google Developers Blog
博客园_首页
Martin Fowler
Martin Fowler
Apple Machine Learning Research
Apple Machine Learning Research
L
LangChain Blog
D
Docker
C
Check Point Blog
T
Tailwind CSS Blog
博客园 - 司徒正美
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Hugging Face - Blog
Hugging Face - Blog
Microsoft Security Blog
Microsoft Security Blog
V
V2EX
博客园 - 叶小钗
T
The Blog of Author Tim Ferriss
酷 壳 – CoolShell
酷 壳 – CoolShell
IT之家
IT之家
M
MIT News - Artificial intelligence
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 【当耐特】
GbyAI
GbyAI

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 天更新一次。