From 4b5b51c8e59e1397cb580d2fc907ac45e9c432f9 Mon Sep 17 00:00:00 2001 From: Allen Li Date: Wed, 20 Aug 2025 15:41:20 -0700 Subject: [PATCH] [auth] Close stdin for git-credential-luci Per the Git credential helper protocol, the credential helpers should read stdin for attributes. Previously, we didn't implement the attributes for git-credential-luci, so this wasn't an issue, but we're (going to) use the attributes now, and if we don't explicitly send or close stdin, the helper will hang Bug: 411487838 Change-Id: I80d47c31e597187c05d5fc23438ae8a52147cb9f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6868130 Commit-Queue: Gavin Mak Auto-Submit: Allen Li Reviewed-by: Gavin Mak --- auth.py | 1 + 1 file changed, 1 insertion(+) diff --git a/auth.py b/auth.py index 914a40625b..3be84a02fe 100644 --- a/auth.py +++ b/auth.py @@ -240,6 +240,7 @@ class GerritAuthenticator(object): try: out, err = subprocess2.check_call_out( ['git-credential-luci', 'get'], + stdin=subprocess2.DEVNULL, stdout=subprocess2.PIPE, stderr=subprocess2.PIPE) logging.debug('git-credential-luci stderr:\n%s', err)