T19-L05 · Share & review code · Level 5 Operator · 22-minute read, plus 3 hours of doing

Almost what you need

Since T19-L04 · Check Every Change Automatically, Release Versions and Tell the Lab, the qPCR protocol checks itself and announces every release. But it still lives in Mia's personal account. Jonas has access because Mia added him by hand. Lena, a new student, starts in October: she should read the protocols, not change them. A password is the only lock. And when the head of the lab asks "If this server dies tonight, what do we lose?", nobody can answer: IT makes backups, but nobody has ever restored one.

In this book you become the person who runs the lab's Gitea. You move the work into an organisation with teams, make sign-in safe, keep copies somewhere else, prove that a restore works, and write it all down so someone else can take over. You are at Level 5 Operator: others depend on this Gitea, so it has to keep working without you.

After this you can

  • Move repositories into an organisation and give access through teams instead of person by person.
  • Turn on two-factor sign-in, and connect the institute login so people sign in with the account they already have.
  • Check who can sign in how, and who still has no second factor.
  • Keep an automatic copy of a repository on another server, such as GitHub.
  • Back up the whole Gitea, restore it on a separate test server, and hand the work over with a one-page runbook.

Before you start

  • Books: T19-L04 · Check Every Change Automatically, Release Versions and Tell the Lab, and T19-L02 · Work on a Shared Gitea Repository From Your Computer With OpenCode for cloning with OpenCode.
  • Administrator rights on your Gitea, or IT next to you. Steps marked (administrator) need them; the rest needs only your own account.
  • Access to the server Gitea runs on (for steps 9, 14 and 15), for you or for IT, and for the restore test a second machine with Docker or Podman, the programs that run Gitea in a container (a sealed-off box for one program).
  • For the institute login: from IT, a client ID, a client secret and a discovery address. They come from the institute's login system (Microsoft Entra ID, Keycloak and others).
  • on your phone, one that shows six-digit codes.