From cf9d96477b958ae5c22a462538f5111e091e5b85 Mon Sep 17 00:00:00 2001 From: cflmy Date: Wed, 9 Sep 2026 16:15:23 +0800 Subject: [PATCH] fix(release): avoid env http_proxy when git uses HK jump -c Match the proven push path: clear env proxies and set only git -c http.proxy. Co-authored-by: Cursor --- .../marqdo-release/scripts/push-via-hk-jump.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.cursor/skills/marqdo-release/scripts/push-via-hk-jump.py b/.cursor/skills/marqdo-release/scripts/push-via-hk-jump.py index 2e0f7ce..e7e6672 100755 --- a/.cursor/skills/marqdo-release/scripts/push-via-hk-jump.py +++ b/.cursor/skills/marqdo-release/scripts/push-via-hk-jump.py @@ -182,14 +182,11 @@ def run_with_proxy(proxy: str, argv: list[str]) -> int: "all_proxy", ): env.pop(k, None) - env["http_proxy"] = proxy - env["https_proxy"] = proxy - env["HTTP_PROXY"] = proxy - env["HTTPS_PROXY"] = proxy cmd = list(argv) if cmd and cmd[0] == "git": # Prefer http.extraHeader over GIT_ASKPASS (askpass has hung under agent/no TTY). + # Do not also set env http_proxy for git — only -c (avoids double-proxy quirks). auth = github_basic_auth_header() cmd = [ "git", @@ -207,17 +204,21 @@ def run_with_proxy(proxy: str, argv: list[str]) -> int: "http.postBuffer=524288000", *cmd[1:], ] - # Do not print the Authorization header. print( "+", " ".join( - c if not c.startswith("http.extraHeader=") else "http.extraHeader=" + c if not str(c).startswith("http.extraHeader=") else "http.extraHeader=" for c in cmd ), flush=True, ) return subprocess.call(cmd, cwd=ROOT, env=env) + env["http_proxy"] = proxy + env["https_proxy"] = proxy + env["HTTP_PROXY"] = proxy + env["HTTPS_PROXY"] = proxy + if cmd and cmd[0] == "gh" and not env.get("GH_TOKEN"): tok = github_token() if tok: