Skip to content

Backup a Github/dwyl Repo to Gitea!  #136

Open

Description

@nelsonic

Our original reasoning for this project is still very much still a reality.

GitHub still has regular "incidents": https://www.githubstatus.com/history where it's offline for hours ... ⏳
image

Using GitHub as our Single source of truth means it's "mission critical" and we need access to it pretty much always.

At present this project mirrors issue data to AWS S3 and @RobStallion asked a very valid question about it: #126
That's OK as a "cold" backup but it's not very useful for business continuity.

Starting Point

Todo

Activity

  1. self-assigned this
    on Apr 7, 2022
  2. nelsonic commented on Apr 8, 2022

    @nelsonic
    MemberAuthor

    https://github.com/gogs/gogs GitHub repo is very popular and has a healthy number of contributors:
    image

    Who is using Gogs? https://gogs.io a lot of CN companies:
    image

    Which makes sense as GitHub is partially blocked in China: https://en.wikipedia.org/wiki/Censorship_of_GitHub#China
    and it probably makes sense for CN companies to be at least a little paranoid of putting all their code/secrets on a US-owned platform. 💭

  3. nelsonic commented on Apr 11, 2022

    @nelsonic
    MemberAuthor

    Also looked at Gitea: https://gitea.io/en-us/ > https://github.com/go-gitea/ > https://try.gitea.io/api/swagger#/repository

    image

    image

    It's a Fork of Gogs with a focus on front-end UI/UX.
    It looks good, basically a clone of what GitHub used to look like before Microsoft.

  4. nelsonic commented on Apr 15, 2022

    @nelsonic
    MemberAuthor
  5. nelsonic commented on Apr 25, 2022

    @nelsonic
    MemberAuthor
  6. nelsonic commented on May 11, 2022

    @nelsonic
    MemberAuthor

    The work on https://github.com/dwyl/gogs is coming along nicely.
    We've shipped most of the core functions we need: https://hexdocs.pm/gogs/api-reference.html

    But we are tidying it up a bit first before using it in an App: dwyl/gogs#24 + dwyl/gogs#25 + dwyl/gogs#26

  7. nelsonic commented on May 14, 2022

    @nelsonic
    MemberAuthor

    really wish I had seen this page earlier: https://docs.gitea.io/en-us/comparison/ ... 🙄 ⏳
    image

  8. nelsonic commented on May 14, 2022

    @nelsonic
    MemberAuthor

    We've invested a considerable amount of time in: ⌛

    But re-reading the Gitea API I'm being forced to re-consider ... 🙄
    I'm suffering from a serious case of "Sunk Cost Bias" ...

    Basically 3 things are forcing me consider switching from Gogs to Gitea:

    1. More extensive and documented API: https://try.gitea.io/api/swagger#/
    2. Ability to create Orgs via the API:
      image
    • Orgs have a visibility option which allows them to be unlisted
      i.e. not visible even if someone has access to the Gitea instance.
    1. Git Diff appears to be available via the API: Feat: Git Diff should return the diff between two commits gogs#27
  9. nelsonic commented on May 14, 2022

    @nelsonic
    MemberAuthor

    Ok, while it totally sucks to write-off the time we've invested in Gogs and switch to Gitea, ⏳ 🔥 🤦‍♂️
    I'm thinking that I will do a Spike to try and replicate the work we've done (deployment, module & demo). 🧑‍💻
    It's definitely not a complete waste of effort because all the local_... functions can be recycled ♻️
    and my reading is that there is a migration path from Gogs to Gitea: https://docs.gitea.io/en-us/upgrade-from-gogs ...
    So all the underlying "DevOps" work should be transferable too. 🤞

    Going to start with getting Gitea running on Fly.io: https://github.com/dwyl/gitea-server
    Then I will try and simulate the API requests noted above:

    1. Create an org that has visibility: hidden
    2. Create a PR and attempt to get the diff via the REST API

    If those two things work and it doesn't take me too much time I will report back.

    Wish me luck! 🍀

  10. nelsonic commented on May 15, 2022

    @nelsonic
    MemberAuthor

    Not for github-backup, but this is a useful feature for orgs that need privacy:
    https://gitea-server.fly.dev/private-org visible to members:
    image

    404 for anyone else:
    image

  11. changed the title [-]Gogs?[/-] [+]~~Gogs?~~ > Gitea![/+] on May 27, 2022
  12. changed the title [-]~~Gogs?~~ > Gitea![/-] [+]Gitea![/+] on May 27, 2022
  13. nelsonic commented on May 27, 2022

    @nelsonic
    MemberAuthor
  14. changed the title [-]Gitea![/-] [+]Backup a Github/dwyl Repo to Gitea! [/+] on May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions