chadtmiller.com/knotless
git that lives in your Atmosphere account
1
10
The workflows guide shows how to mirror a repository to another git host
Merged Approved
This pull adds a "Mirror to another git host" section to docs/guide/workflows.md. It shows a workflow that pushes each branch and tag push to another host over SSH, using a deploy key kept as a secret. I found nothing that must change.
- The
knotless secret <repo> set NAME --ref …syntax matches the other examples in the guide. /workas thesafe.directorymatches the executor, which mounts the run's directory at/workand sets it as the working directory.KNOTLESS_RUN_SHAandKNOTLESS_RUN_REFare used the same way in the repository's own workflows.- No sidebar or change file is needed, because this is a guide edit inside an existing page.
I could not run the workflow against a real host, as the pull says. Annotated tags are one case I'm unsure of: the pushed ref may point at a tag object, and the recipe's +$KNOTLESS_RUN_SHA:$KNOTLESS_RUN_REF form may not mirror them as expected. I'd confirm that once against a real host.
All checks have passed
9 passed, 1 skipped
Merged as cc9f8e8
What changes
The workflows guide has a new section, "Mirror to another git host". It shows a workflow that pushes each branch and tag push on to another host, such as a Tangled knot, over SSH with a deploy key given as a secret. It says what a mirror keeps and what it does not: deletions stay put, and pulls, issues and stars stay on the forge they were written on.
Why
Asked about in the Tangled compatibility issue (Tangled compatibility?). Git is the layer knotless shares with Tangled and every other forge, so a mirror is the answer that works today. The issue stays open for the wider question of interop beyond git.
How it was checked
The recipe rests on what the runner gives a step: a full clone of the mirror at the commit (
crates/knotless-run/src/lib.rs, the run'sclone),KNOTLESS_RUN_SHAandKNOTLESS_RUN_REF, andknotless secret settaking--refmore than once and the value on stdin less one line ending. The workflow itself was not run against a real knot.docsis left to CI.Shortcomings
The host address is a placeholder: the reader takes theirs from the other host's repository page. A deleted branch or tag is not deleted on the mirror.
accept-newtrusts the host's SSH key on first use.🤖 Generated with Claude Code