Previously repo create only initialized the local repo and relied on
Gitea's push-to-create feature, which always yields a private
repository. Now the script pre-creates the remote via the Gitea API
honoring --visibility public|private (default: private), and falls
back to a PATCH when the repo already exists.
Gitea's /-/link/{repo} endpoint returns HTTP 400 "invalid argument"
whenever the package already has ANY linked repo, and /-/unlink returns
the same 400 when nothing is linked. Both are non-idempotent. Fix by
GET-ing the package version first, comparing the current repository to
the target, and only unlinking/linking when the state actually needs to
change. Idempotent across repeated publishes of the same image.
Cloudflare's free plan limits request bodies to ~100MB, causing 413 on large
docker layer pushes. Push through an SSH tunnel directly to the Gitea origin
server on vps.git instead of through Cloudflare.
- Use -u username:password basic auth for all API calls
- GET /users/{name}/tokens to find existing token
- DELETE /users/{name}/tokens/{id} to remove existing token
- POST /users/{name}/tokens with {"name": "...", "scopes": ["all"]}
- Extract 'sha1' field from POST response as the token value
- Use ego-mgr get default-username instead of secret-mgr get-username
1. For docker command, look up the repo owner via 'repo search' API
2. Use 'ego-mgr lookup' to get the owner's agent-id
3. Export AGENT_ID to that agent-id so docker push goes to correct namespace
4. Also fix link API auth: use '-u owner:token' (basic auth) instead of
'Authorization: token' header, since repo owner's 'git' secret is a
password not a bearer token
Send GET to /api/v1/repos/search?q={name} and filter results
by exact name match. Output: {"ok": true/false, "data": [...]}
with each match containing id, owner.login, name, clone_url.
The link step now:
1. Extracts the actual repo owner from the git remote URL
2. Captures HTTP response status and body
3. Shows a clear warning when the repo belongs to a different owner
(requires site admin or matching owner), instead of silently failing
- Add create-repo script for creating new repositories on git.hangman-lab.top
- Integrate create-repo into git-ctrl dispatcher
- Update SKILL.md with new command documentation