hive-forge repo-create: say the account can't create repos instead of a bare 500
This commit is contained in:
parent
5b319e0600
commit
6ec12e7d84
2 changed files with 83 additions and 19 deletions
|
|
@ -102,7 +102,7 @@ Deadline: hive-forge stops after HIVE_FORGE_DEADLINE seconds (default 900), prin
|
|||
* `comment-show` — Print the body (or full JSON) of a single comment by id
|
||||
* `comment-edit` — Edit an existing comment by id
|
||||
* `clone` — Clone a forge repo (default `-r`/`HIVE_FORGE_REPO`) with credentials autoinjected. Pairs with `pr create --agit`
|
||||
* `repo-create` — Create a forge repo under the current user (or `--org`). Prints the repo URL
|
||||
* `repo-create` — Create a forge repo under the current user (or `--org`). Prints the repo URL. Agent accounts can't create repos (limit 0)
|
||||
* `repo-add-collaborator` — Add a collaborator to the active repo (`-r`/`HIVE_FORGE_REPO`) with a permission level. Companion to `repo-create`
|
||||
* `repo-labels` — List every label defined on the repo (name + description), optionally filtered by a name substring
|
||||
* `repo-search` — Search the forge for repositories by keyword, topic, or description
|
||||
|
|
@ -1008,7 +1008,7 @@ Clone a forge repo (default `-r`/`HIVE_FORGE_REPO`) with credentials autoinjecte
|
|||
|
||||
## `hive-forge repo-create`
|
||||
|
||||
Create a forge repo under the current user (or `--org`). Prints the repo URL
|
||||
Create a forge repo under the current user (or `--org`). Prints the repo URL. Agent accounts can't create repos (limit 0)
|
||||
|
||||
**Usage:** `hive-forge repo-create [OPTIONS] <NAME>`
|
||||
|
||||
|
|
|
|||
|
|
@ -224,16 +224,18 @@ plain comment show under `last comment`, not `reviews`.
|
|||
|
||||
### Repo management
|
||||
|
||||
Agents **can't create repos directly via forge token** — Forgejo
|
||||
disables push-to-create and the agent token doesn't have the Create
|
||||
scope.
|
||||
Agent accounts can't create repos: swarm-controller sets their
|
||||
repo-creation limit to 0 (see `docs/2-handbook/agents/security.md`), so
|
||||
an operator merge stays the only path to main. Ask the operator to
|
||||
create the repo (for example `agents/<name>`) and add you as a
|
||||
collaborator. Forgejo also disables push-to-create.
|
||||
|
||||
The CLI verbs below (`repo-create` / `repo-add-collaborator`) use the
|
||||
agent's own forge token, so a repo lands under the agent's user account
|
||||
or an org the agent belongs to.
|
||||
`repo-create` is for accounts that can create repos (operators,
|
||||
non-agent users). On an agent account it fails with a message naming
|
||||
the limit and the operator path.
|
||||
|
||||
**`repo-create <name>`** — create a repo under the authenticated user
|
||||
and print its URL. Key flags:
|
||||
and print its URL. Not available to agent accounts. Key flags:
|
||||
|
||||
- `--org <ORG>` — create under an org namespace instead
|
||||
- `--private` — private repo (default: public)
|
||||
|
|
|
|||
Loading…
Reference in a new issue