Hacker News 中文摘要

RSS订阅

从GitHub迁移到Codeberg,懒人指南 -- Moving from GitHub to Codeberg, for lazy people

文章摘要

文章作者分享了自己从GitHub迁移到Codeberg的经验,指出Codeberg的仓库导入功能可以轻松迁移issues、pull requests和发布内容,且界面与GitHub相似。对于使用GitHub Pages的用户,Codeberg也提供了类似的替代方案codeberg.page。整个过程比想象中简单,适合想要迁移但担心复杂操作的人。

文章总结

标题:懒人版GitHub迁移Codeberg指南

本文作者分享了自己将代码仓库从GitHub迁移到Codeberg的实践经验,主要包含以下关键内容:

  1. 迁移准备
  • 作者长期犹豫迁移,担心Codeberg不够成熟且过程繁琐
  • 实际体验发现迁移难度因项目而异
  1. 核心迁移步骤
  • 问题追踪迁移:Codeberg提供一键导入功能,完美保留issue编号、标签和作者信息
  • GitHub Pages替代方案:推荐使用codeberg.page服务,操作方式与GitHub Pages类似
  • CI解决方案:需放弃GitHub的macOS运行器和无限容量,建议采用跨平台编译或自托管Forgejo Actions运行器
  1. 技术细节
  • 推荐Forgejo Actions而非Woodpecker CI,因其语法与GitHub Actions高度兼容
  • 现有Actions生态基本可直接复用(仅需修改URL前缀)
  • 若必须使用macOS运行器,可考虑GitHub与Codeberg双仓库同步方案
  1. 旧仓库处理
  • 简单方案:更新README后归档仓库
  • 高级方案:设置单向同步,但需注意issue/pr管理问题

注:原文中关于具体CI服务商比较、脚注内容等次要细节已做简化处理。

评论总结

以下是评论内容的总结,平衡呈现不同观点并保留关键引用:

支持GitHub的观点 1. CI功能优势:用户认为GitHub的CI服务(尤其是免费macOS运行器和公开仓库无限容量)是核心竞争力 - "GitHub has done an excellent job luring people in with free macOS runners" (unwoven) - "it's simply no longer reasonable to BYO CI" (woodruffw)

  1. 使用便利性:部分用户认为GitHub提供了全面的服务,迁移成本高
    • "GitHub gives you a lot for 'free'" (999900000999)
    • "git hosting is not something I want to wast my time yak shaving" (elzbardico)

支持替代平台的观点 1. 意识形态选择:部分用户因微软收购或隐私问题选择离开GitHub - "I've been mostly off the GitHub train since the MS acquisition" (mplanchard) - "they are training on private repos too" (999900000999)

  1. Codeberg的优缺点:
    • 优点:简单设计、开源理念
      • "Codeberg is great" (mplanchard)
      • "simple design of the page" (codazoda)
    • 缺点:不支持私有仓库、稳定性问题
      • "Codeberg doesn't let you create private repositories" (999900000999)
      • "they still have downtime" (INTPenis)

自托管方案 1. 自建服务的优势:部分用户推荐自托管方案如Forgejo/Gitea - "selfhost your own gitea instance" (Jotalea) - "self-hosted forgejo...it's been great" (cdrnsf)

  1. 去中心化理念:有用户提出git协议本身支持分布式存储
    • "Repo hosting ought to be distributed/federated" (ponkpanda)

中立/实用主义观点 1. 平台选择取决于需求: - "not a 'true' GitHub replacement" (noirscape) - "depends on your needs" (dalvrosa)

  1. 搜索碎片化问题:
    • "fracturing of code hosting platforms an annoyance" (mrbluecoat)

关键分歧点集中在CI服务完备性、隐私保护、平台稳定性以及私有仓库支持等方面,体现了开发者群体在理想主义与现实需求之间的权衡。