ci-box: say what git has to authenticate with when deepening fails
Names only, never values.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
1 file changed,
+6
−0
scripts/ci-box.py+6 −0
Intent
diff --git a/scripts/ci-box.py b/scripts/ci-box.py| index 4125c171..c0e8c96a 100755 |
| --- a/scripts/ci-box.py |
| +++ b/scripts/ci-box.py |
| @@ -268,6 +268,12 @@ def deepen(): |
| if result.returncode != 0: |
| say("WARNING: the clone is one commit deep and could not be deepened: " + |
| result.stderr.decode(errors="replace").strip()[-400:]) |
| + # Names only, never values: what git has to authenticate with. |
| + names = sorted(n for n in os.environ if n.startswith(("GIT_", "GOAUTH", "GOPRIVATE", "NETRC"))) |
| + keys = sorted(set(line.split("=", 1)[0] for line in git("config", "--list").stdout.decode().splitlines() |
| + if "credential" in line or "url." in line or "extraheader" in line.lower())) |
| + say("git settings present (names only): env %s; config %s; origin %s" % |
| + (names or "none", keys or "none", git("remote", "get-url", "origin").stdout.decode().strip())) |
| return |
| say("clone deepened in %.1fs" % (time.time() - started)) |