[credential "https://chromium.googlesource.com"]
helper =
-helper = luci
+helper = luci
+useHttpPath = yes
diff --git a/git_auth.py b/git_auth.py index 411dbb2bbd..7079ce7437 100644 --- a/git_auth.py +++ b/git_auth.py @@ -899,6 +899,10 @@ class ConfigWizard(object): cred_key = _creds_helper_key(parts) self._set_config(cred_key, '', modify_all=True, scope=scope) self._set_config(cred_key, 'luci', append=True, scope=scope) + self._set_config(_creds_use_http_path_key(parts), + 'yes', + modify_all=True, + scope=scope) def _set_sso_rewrite(self, parts: urllib.parse.SplitResult, *, scope: scm.GitConfigScope) -> None: @@ -1082,6 +1086,11 @@ def _creds_helper_key(parts: urllib.parse.SplitResult) -> str: return f'credential.{_url_host_url(parts)}.helper' +def _creds_use_http_path_key(parts: urllib.parse.SplitResult) -> str: + """Return Git config key for using path with helpers.""" + return f'credential.{_url_host_url(parts)}.useHttpPath' + + def _sso_rewrite_key(parts: urllib.parse.SplitResult) -> str: """Return Git config key for SSO URL rewrites.""" return f'url.sso://{_url_shortname(parts)}/.insteadOf' diff --git a/man/html/depot_tools_gerrit_auth.html b/man/html/depot_tools_gerrit_auth.html index 4ed8c8792a..cc1e78076b 100644 --- a/man/html/depot_tools_gerrit_auth.html +++ b/man/html/depot_tools_gerrit_auth.html @@ -778,7 +778,8 @@ creds-check), you can also do it manually.
[credential "https://chromium.googlesource.com"]
helper =
-helper = luci
+helper = luci
+useHttpPath = yes
This tells Git to use git-credential-luci. The first empty value
line is needed to reset the helper list to prevent conflicts.