From e7ee87fa91892a0dd8a43c29e3b1a87555b61f7d Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Tue, 22 Sep 2026 15:25:20 +0200 Subject: [PATCH] cmds.projects.CmdGetAuthInfo: Fix: echo credentials "None" get-auth-info() reads the origin URL of the jw-pkg repository and reports its username and password. Uri.username and Uri.password are None for URLs without a credentials part, but _run() stored them in the result anyway, so --username --only-values printed the literal string "None" for such URLs. The bootstrap Makefile derives JANWARE_USER from exactly that output on its second parse, after the jw-pkg directory has been cloned from an anonymous https origin whose URL has no user part. JANWARE_USER thus became the string "None", pgit.sh is invoked with --login None and --refspec None:current-branch:current-branch, and queries the Forgejo API for the repositories of a non-existent "None" org, so every anonymous bootstrap fails with "Failed to enumerate repositories". Make _run() only record values that are not None, so missing credentials produce no output instead of the string "None". Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.87.0 Signed-off-by: Jan Lindemann --- src/python/jw/pkg/cmds/projects/CmdGetAuthInfo.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/python/jw/pkg/cmds/projects/CmdGetAuthInfo.py b/src/python/jw/pkg/cmds/projects/CmdGetAuthInfo.py index 1623fda1..14e84a25 100644 --- a/src/python/jw/pkg/cmds/projects/CmdGetAuthInfo.py +++ b/src/python/jw/pkg/cmds/projects/CmdGetAuthInfo.py @@ -79,7 +79,9 @@ class CmdGetAuthInfo(Cmd): # export ]: # TODO: Use other remotes, too? parsed = Uri(url) for key in keys: - result[key] = getattr(parsed, key) + val = getattr(parsed, key) + if val is not None: + result[key] = val base = parsed.to_string base = re.sub(r'/jw-pkg', '', base) base = re.sub(r'/proj$', '', base) -- 2.55.0