feat(ssh): protocol mode - per-forge/per-repo git-protocol choice, set at auth login or by flag #292

Closed
opened 2026-07-20 14:44:46 +00:00 by hexajon · 0 comments
hexajon commented 2026-07-20 14:44:46 +00:00 (Migrated from codeberg.org)

Part of #187 (SSH-only mode epic). First slice: the mode itself.

A persisted protocol setting decides how madtea builds git URLs: token + https git (today's default), token + ssh git, or ssh only, no token. Set during auth login (offered as a choice) or directly via config/flag; readable by every code path that constructs a git URL. This slice adds the setting, its resolution (repo > global, consistent with the existing config precedence), and the auth-login prompt - it does NOT yet change clone/push behavior (later slices consume the mode).

Acceptance:

  • A documented config key (e.g. protocol) with the three values, resolved repo-then-global, exposed to later slices through one accessor
  • auth login offers the choice (default unchanged: token + https) and persists it; a non-interactive path exists (flag or pre-set config)
  • auth whoami (or status) reports the active protocol mode so a misconfigured repo is diagnosable
  • In ssh only mode, login does not require or store a token
  • Unit tests pin resolution order and the three values; unknown values produce a teaching error
Part of #187 (SSH-only mode epic). First slice: the mode itself. A persisted protocol setting decides how madtea builds git URLs: `token + https git` (today's default), `token + ssh git`, or `ssh only, no token`. Set during `auth login` (offered as a choice) or directly via config/flag; readable by every code path that constructs a git URL. This slice adds the setting, its resolution (repo > global, consistent with the existing config precedence), and the auth-login prompt - it does NOT yet change clone/push behavior (later slices consume the mode). Acceptance: - [ ] A documented config key (e.g. `protocol`) with the three values, resolved repo-then-global, exposed to later slices through one accessor - [ ] `auth login` offers the choice (default unchanged: token + https) and persists it; a non-interactive path exists (flag or pre-set config) - [ ] `auth whoami` (or status) reports the active protocol mode so a misconfigured repo is diagnosable - [ ] In `ssh only` mode, login does not require or store a token - [ ] Unit tests pin resolution order and the three values; unknown values produce a teaching error
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sixfold-space/madtea#292
No description provided.