This reverts commit 39e269dabf.
Reason for revert: Breaks git cl upload via SSO
Bug: 421831933
Original change's description:
> [git_auth] Configure common -review hosts also
>
> Seems like ChromeOS workflows with repo force these URLs. While the
> repo instructions technically tell users to set this up separately,
> config them here too so I don't get bug reports.
>
> Bug: 421831933
> Change-Id: Ie33c678de3a6d2dadd6663ad6e0e97e9086d6129
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6614517
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Commit-Queue: Allen Li <ayatane@chromium.org>
Bug: 421831933
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I76a981ff50bc1b9e18c82223e23d891b89917924
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6615841
Auto-Submit: Joey Scarr <jsca@google.com>
Owners-Override: Joey Scarr <jsca@google.com>
Commit-Queue: Joey Scarr <jsca@google.com>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Seems like ChromeOS workflows with repo force these URLs. While the
repo instructions technically tell users to set this up separately,
config them here too so I don't get bug reports.
Bug: 421831933
Change-Id: Ie33c678de3a6d2dadd6663ad6e0e97e9086d6129
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6614517
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
Make it consistent with the other line that uses "yet"
Change-Id: I6cae354b61ac673bb4d93a878daf01cebbf67a0b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6459922
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Most users who access this have SSO, but there are some people with,
e.g., read access without SSO.
So we may as well configure this always I guess, even if it's
nonfunctional for many people since they have no permission to any
repos on chrome-internal.
Change-Id: Ia560a64e7771f1438fb1527389a310bbbe951477
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6456192
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
Some users just run creds-check which doesn't fix submodules.
Bug: 408501013
Change-Id: Iddb19e922aff8cb265638588595403ac193ead52
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6449740
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Otherwise it creates a dependency cycle. This is needed if we want to
recurse into submodules. Maybe this should be refactored more, but
this should be an improvement for now.
Change-Id: I4641e9ce1952bba81f717acbeefd59dd687d87ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6448579
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
The config dumps a lot of text, so pause here. Probably improves UX a
bit.
Change-Id: I9890f9286abe28ecc3e6f05b6d0dde94c5bc9710
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6442237
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
The UX of cd'ing to a non-Gerrit repo to setup common repo auth is not
good. Also people don't read.
Bug: 408501013
Change-Id: Ia31914cf8672d0b5a6033de11c928140fd34a95c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6442235
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
People assume the tool has failed and keep trying to re-run it when it
says to run git credential-luci login.
Bug: 408501013
Change-Id: Id1f671bacfdc19d4614ff03cfa69bfd484ad741b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6441970
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
Clarify why SSO is needed for the check, even if the account may not
need SSO.
Bug: 408243787
Change-Id: If855eec2dbc414a112db3469b5cc73b3f5846651
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6431248
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
In particular, when we enable new auth by default, one of the tests
that uses gclient to clone a local directory fails.
Bug: 404613530
Change-Id: I1bd41da2a3aba6f92cc3d5d9c75ab4d8fc293f22
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6426441
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
The credential helper rules should not have a path, while the URL
rewrite rules should.
Reland of I79b52ab4af62367363617b2a9afa03a67f5ea0b9
Bug: b/401338175
Bug: b/403635929
Change-Id: Ib89d9e855ca5eba29cc67f8846bb7ca0cb3622ab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6363080
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
Make this available for testing first.
This should be functionally roughly analogous with the current auto
configuration logic, and it prints all actions it performs so it
should be pretty safe to play with, even if it hypothetically
misbehaves.
Bug: b/401338175
Change-Id: I803c7e167e355ec8cca1f5959099138c2fee305e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6334614
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
This reverts commit ce47e785fa.
Reason for revert: fatal: --local can only be used inside a git
repository.
Original change's description:
> [git_auth] Use pathless URL for cred helper
>
> The credential helper rules should not have a path, while the URL
> rewrite rules should.
>
> Bug: b/401338175
> Change-Id: I79b52ab4af62367363617b2a9afa03a67f5ea0b9
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6345631
> Commit-Queue: Allen Li <ayatane@chromium.org>
> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Bug: b/401338175
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Ifa887eeb7a7049665570e865431b41ac18649b90
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6357165
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
The credential helper rules should not have a path, while the URL
rewrite rules should.
Bug: b/401338175
Change-Id: I79b52ab4af62367363617b2a9afa03a67f5ea0b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6345631
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
If the user uses SSO (and thus has SSO rewrite rules) for their global
config, a repo which locally uses an email that doesn't use SSO needs
an override.
Bug: b/390219533
Change-Id: I639dae4c1a45bbd2c17180855c22260979b0dbc2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6177780
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
git-credential-luci is very similar to luci-auth, except that it is
expressly for git/Gerrit. Therefore, it hard codes the scopes needed
for git/Gerrit. It's also a separate binary, which makes it more
convenient for us to configure it for ReAuth later.
Bug: b/382341041
Change-Id: I7de56d3922adac7eb4671849eb6e30be310d4de7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6073043
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>