make-release: Use the same credentials for Gerrit API and Git operations
Prior to this change, the Gerrit API client resolved its credentials one
way (either via username/password in the configuration file or
requests
netrc resolution) and git
operations were left to resolve
credentials independently via their own default behavior.
Ensure git
operations use the same credentials that are resolved for
the Gerrit API by configuring a credential helper for all newly cloned
repos. The clone()
function will now yield a git()
function that
will set an environment variable with the password for all underlying
git
commands.
Bug: T373441
Related MRs:
- !112 (merged)
- !111 (merged) (This MR)
- main-I60c90f33e3a2d82df11b953131508fbbec47d477