diff --git a/git_auth.py b/git_auth.py index 8b50cda1a..1980cfe1b 100644 --- a/git_auth.py +++ b/git_auth.py @@ -375,17 +375,6 @@ class ConfigWizard(object): self._println( '(Report any issues to https://issues.chromium.org/issues/new?component=1456702&template=2076315)' ) - if not newauth.Enabled(): - self._println() - self._println('You have not enabled new auth.') - self._println('This tool will configure Git to use new auth,') - self._println('while depot_tools will continue to use old auth.') - self._println( - "We recommend not continuing, though you may if you're adventurous." - ) - self._println('(It will probably work. Maybe.)') - if not self._ui.read_yn('Continue?', default=False): - return self._println() self._fix_gitcookies() self._println() diff --git a/git_cl.py b/git_cl.py index 06c087169..e88bfc6e7 100755 --- a/git_cl.py +++ b/git_cl.py @@ -3904,27 +3904,13 @@ def CMDcreds_check(parser, args): if newauth.Enabled(): cl = Changelist() - host = cl.GetGerritHost() - print(f'Using Gerrit host: {host!r}') - git_auth.Configure(os.getcwd(), cl) - # Perform some advisory checks - email = scm.GIT.GetConfig(os.getcwd(), 'user.email') or '' - print(f'Using email (configured in Git): {email!r}') - if gerrit_util.ShouldUseSSO(host, email): - print('Detected that we should be using SSO.') - else: - print('Detected that we should be using git-credential-luci.') - a = gerrit_util.GitCredsAuthenticator() - try: - a.luci_auth.get_access_token() - except auth.GitLoginRequiredError as e: - print('NOTE: You are not logged in with git-credential-luci.') - print( - 'You will not be able to perform many actions without logging in.' - ) - print('If you wish to log in, run:') - print(' ' + e.login_command) - print('and re-run this command.') + try: + remote_url = cl.GetRemoteUrl() + except subprocess2.CalledProcessError: + remote_url = '' + wizard = git_auth.ConfigWizard( + git_auth.UserInterface(sys.stdin, sys.stdout)) + wizard.run(remote_url) return 0 if newauth.ExplicitlyDisabled(): git_auth.ClearRepoConfig(os.getcwd(), Changelist()) @@ -3955,22 +3941,6 @@ def CMDcreds_check(parser, args): return 1 -def CMDcreds_check2(parser, args): - """Checks credentials and suggests changes. - - New wizard version, currently for testing use. - """ - _, _ = parser.parse_args(args) - cl = Changelist() - try: - remote_url = cl.GetRemoteUrl() - except subprocess2.CalledProcessError: - remote_url = '' - wizard = git_auth.ConfigWizard(git_auth.UserInterface( - sys.stdin, sys.stdout)) - wizard.run(remote_url) - - @metrics.collector.collect_metrics('git cl baseurl') def CMDbaseurl(parser, args): """Gets or sets base-url for this branch."""