[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 <gavinmak@google.com>
Auto-Submit: Allen Li <ayatane@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
This commit is contained in:
Allen Li
2025-08-20 15:41:20 -07:00
committed by LUCI CQ
parent d6b162a075
commit 4b5b51c8e5

View File

@@ -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)