Marketplace: GitHub sign-in through gh inside a container

Drives `gh auth login --web` in a running project container over an
attached pty, with GH_CONFIG_DIR/GIT_CONFIG_GLOBAL in a temp dir that is
removed on exit (also on HUP/INT/TERM), emits the one-time code and
redacted output lines, and returns the token read back between markers.
Host validation reuses auth::valid_host plus a no-port check (F13); a
cancel or timeout also pkills the in-container login (N9). Reuses the
setup-token flow's AnsiStripper, push_capped_tail and Enter delay, made
pub(crate) without behaviour change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-27 09:27:22 -07:00
co-authored by Claude Opus 5.5
parent 7f3fe8cded
commit d84637fd39
3 changed files with 549 additions and 4 deletions
+1
View File
@@ -5,6 +5,7 @@
pub mod auth;
pub mod catalog;
pub mod diff;
pub mod gh_login;
pub mod git;
pub mod payload;
pub mod tree;