Commit Graph

25 Commits (a2c6f107c38a7d22acea1831d3c6f16090c2eb2b)

Author SHA1 Message Date
Allen Li a2c6f107c3 [git_auth] Move config wizard to creds-check
Bug: b/404613530
Change-Id: Ie0b8fd675b66739a129d5eeeda895473a8a49eeb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6368999
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 months ago
Allen Li 428ceb6428 [git_auth] Add extra info about OAuth setup
Change-Id: I145d18dbddee27b8655005c789191b3c524f0710
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6367722
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 months ago
Allen Li a0d13c9549 [git_auth] Use pathless URL for cred helper
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>
2 months ago
Allen Li 8fecc592a2 Add auth config wizard
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>
2 months ago
Josip Sokcevic 948edc4382 Revert "[git_auth] Use pathless URL for cred helper"
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>
2 months ago
Allen Li ce47e785fa [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>
2 months ago
Allen Li 0445e00a08 [git_auth] Add _url_shortname helper
Breaking out independent chunks from a larger CL

Bug: b/401338175
Change-Id: I0b439596fb613355cb33b4b1d2a0481489d7c0c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6345630
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
2 months ago
Josip Sokcevic f61e11c19f roll_dep_test: fix tests
This partially reverts commit 1221440015.

Change-Id: Ib2e9d41b3871004376a952e643e13a7e67eb750e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6340427
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Allen Li <ayatane@chromium.org>
2 months ago
Allen Li 877b1e3cbd [auth] Hide global SSO rewrite in local repo
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>
4 months ago
Allen Li 522f5a4bd1 gerrit_util: Use git-credential-luci instead of luci-auth
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>
6 months ago
Allen Li 4b94130034 [gerrit_util] Add fallback if missing Gerrit account
Bug: b/366261039
Change-Id: I7d22c4f03ad9bd837190dee7a511af3437a30434
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5869050
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
8 months ago
Allen Li 58e0e19462 [git_auth] Remove old option cleanup
Change-Id: I426199d05613397a74aba87ad8dcbd67a0175ee7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5869051
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
8 months ago
Allen Li a603aded9a [gclient_scm] Add new auth stack setup to gclient
Bug: b/356935829
Change-Id: Ie917f142c3fddba398a5351d685a7b131b298a76
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5762791
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
10 months ago
Allen Li 2f8e1e499d [git_auth] Improve example comments
Change-Id: If82a044ef9c832d3d10bacc5a6c496d39aee6841
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5762790
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
10 months ago
Allen Li 03a5043a94 [git_auth] Remove unnecessary quotes
Not needed with future import

Change-Id: I14d56465dc42ac710b64b301928057329ac9d038
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5762789
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
10 months ago
Allen Li 7815620b1f [git_auth] Auto configure global config also
Bug: b/351071334
Change-Id: I069443a74cf7e33ce9ebea53ea3d52e272ed3570
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5740605
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
10 months ago
Allen Li be5ff1a6c4 [git_auth] Move auto configure logic
Bug: b/351071334
Change-Id: Ic6574f86208b22e406e36f8cd45a564ea74ec7f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5742793
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
10 months ago
Allen Li db74f93ff9 [git_auth] Rename configure functions
Bug: b/351071334
Change-Id: Ic0378590bd678226db2563e9180076f87dafdc66
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5739678
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
10 months ago
Allen Li 1590dceac5 [git_auth] Move auth related functions
Bug: b/351071334
Change-Id: I4f88b06011864d4412b7ff94a99dfb4f6852ba62
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5739677
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
10 months ago
Allen Li 3e86c1254a [git_auth] Fix type checking
Bug: b/351071334
Change-Id: Icc54c7b0b4783cea80dda9fda9ac2c7086bd14fe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5742438
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
10 months ago
Allen Li f58548ab8c [git_auth] Add comment about import cycle
Bug: b/351071334
Change-Id: I14aa44e81d936201c9ddf0ffc52152287ec54cad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5742789
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
10 months ago
Robert Iannucci 4903a45ccc [git_auth] Fix some bugs introduced during refactoring.
R=ayatane, dlf

Change-Id: I11371375b7f02e9ed5b67cde79ee05da6b0ba5c1
Bug: 351071334
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5740607
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Dan Le Febvre <dlf@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
10 months ago
Allen Li 8dde9800ee [git_auth] Rename GitAuthConfigChanger
Bug: b/351071334
Change-Id: Ia12bf72bfaef11768cb60ba0631aafd5ffc9f1fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5739676
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
10 months ago
Allen Li fed7aa526c [git_auth] Rename GitAuthMode
Bug: b/351071334
Change-Id: I29bfdff79e04d2df3df62019fc0c7dfd87dd302f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5739675
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
10 months ago
Allen Li a61e517b45 [git_auth] Move Git auth stuff to new file
Needs to be imported by gclient

Bug: b/351071334
Change-Id: Ibcb7c5541ffab6f9302efad863d0c59b8041122d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5739296
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
10 months ago