~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

knotless.dev
1 collaborator

knotless 0.13.0 Latest 2 packages, 1 image

1
10

The workflows guide shows how to mirror a repository to another git host

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:docs/mirror-recipe

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's clone), KNOTLESS_RUN_SHA and KNOTLESS_RUN_REF, and knotless secret set taking --ref more than once and the value on stdin less one line ending. The workflow itself was not run against a real knot. docs is 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-new trusts the host's SSH key on first use.

🤖 Generated with Claude Code

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.
  • /work as the safe.directory matches the executor, which mounts the run's directory at /work and sets it as the working directory.
  • KNOTLESS_RUN_SHA and KNOTLESS_RUN_REF are 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.

Merged as cc9f8e8