mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 10:41:31 +00:00
[gclient] Handle auth setup for cached repos
Bug: b/389733575 Change-Id: I3b65d380551cbc23746e285d082076514edebf5d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6169811 Commit-Queue: Allen Li <ayatane@chromium.org> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
This commit is contained in:
@@ -1369,7 +1369,11 @@ class GitWrapper(SCMWrapper):
|
||||
|
||||
# Set up Git authentication configuration that is needed to clone/fetch the repo.
|
||||
if newauth.Enabled():
|
||||
git_auth.ConfigureGlobal('/', url)
|
||||
# We need the host from the URL to determine auth settings.
|
||||
# The url parameter might have been re-written to a local
|
||||
# cache directory, so we need self.url, which contains the
|
||||
# original remote URL.
|
||||
git_auth.ConfigureGlobal('/', self.url)
|
||||
|
||||
if hasattr(options, 'no_history') and options.no_history:
|
||||
self._Run(['init', self.checkout_path], options, cwd=self._root_dir)
|
||||
|
||||
Reference in New Issue
Block a user