Add only the origin remote to the local project

create_local_project no longer adds a github remote, with or without GitHub:
a push to origin reaches GitHub through the push mirror. A github remote that
already exists, such as one made by an earlier version, is left as it is, and
a different origin is still refused.

- Remove github_remote_url, which nothing else used
- README describes the one remote and how to remove an old github remote
- Tests: origin is the only remote with and without GitHub, no GitHub address
  in .git/config, and an existing github remote is kept

Task: MIL-008#1
Task: MIL-008#2
Task: MIL-008#3
This commit is contained in:
2026-10-08 11:13:21 +08:00
parent 039a28c01b
commit 79f6edeb38
4 changed files with 36 additions and 24 deletions
+8 -6
View File
@@ -5,7 +5,7 @@ RepoFoundry (`src/create-project.sh`) sets up a new project in one run:
- a **Gitea** repository (the source of truth),
- optionally an empty **GitHub** repository that receives everything through a
**push mirror from Gitea to GitHub**,
- and a **local project** with credential-free remotes and the
- and a **local project** with one credential-free remote, `origin` (Gitea), and the
[SQA-QC-Framework](https://git.tirsystem.com/TirSystem/SQA-QC-Framework)
added as a git submodule, with its skills, git hooks (and optionally the plan
gate) and templates installed.
@@ -266,9 +266,9 @@ Without `--apply` that is all that happens. With `--apply` the script asks
1. the GitHub repository (empty), if chosen;
2. the Gitea repository (with the license that applies: `PROJECT_LICENSE`, or AGPL-3.0 for a public project with GitHub);
3. the push mirror Gitea -> GitHub, and a request for its first sync;
4. the local directory, `git init` on `main`, the `origin` remote (and `github`
if chosen), and, if the Gitea repository holds the license commit, that
history;
4. the local directory, `git init` on `main`, the `origin` remote (the only
remote: a push to it reaches GitHub through the mirror) and, if the Gitea
repository holds the license commit, that history;
5. the framework as the submodule `framework`;
6. the framework's skills and git hooks, and the plan gate if chosen;
7. `AGENTS.md` and `docs/artifact-registry.md` from the framework's templates.
@@ -379,8 +379,10 @@ script stops before it creates anything when a preflight check is refused.
- **No destructive commands.** The script never deletes a repository or a
file and never uses a recursive delete; temporary files are removed one by
one.
- **Credential-free remotes.** `origin` is `ssh://git@host:port/owner/name.git`
(or plain HTTPS when SSH is not used) and `github` is a plain HTTPS address.
- **Credential-free remote.** `origin` is `ssh://git@host:port/owner/name.git`
(or plain HTTPS when SSH is not used). There is no `github` remote: push to
`origin` and the mirror carries it to GitHub. A `github` remote made by an
earlier version is left alone; remove it with `git remote remove github`.
- **Redirects are not followed,** so a token is only ever sent to the host in
the URL it was meant for. Unknown SSH host keys are refused.
- **Framework scripts run on the new project only.** They are run with