From f7f9dd4deb3b92bf175a0411dac60e7b6fdd9cfa Mon Sep 17 00:00:00 2001 From: Josip Sokcevic Date: Thu, 3 Oct 2024 20:32:04 +0000 Subject: project: Handle git sso auth failures as repo exit If a user is not authenticated, repo continues execution and it will likely result in more of the same errors being printed. A user is also likely to SIGTERM the process resulting in more errors. This change stops repo sync if any of repositories can't be fetched to Git authentcation using sso helper. We could extend this to all Git authentication Change-Id: I9e471e063450c0a51f25a5e7f12a83064dfb170c Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/438522 Reviewed-by: Gavin Mak Tested-by: Josip Sokcevic Commit-Queue: Josip Sokcevic --- error.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'error.py') diff --git a/error.py b/error.py index 7958a0a1..36bc2129 100644 --- a/error.py +++ b/error.py @@ -107,6 +107,10 @@ class GitError(RepoError): return self.message +class GitAuthError(RepoExitError): + """Cannot talk to remote due to auth issue.""" + + class GitcUnsupportedError(RepoExitError): """Gitc no longer supported.""" -- cgit v1.2.3-54-g00ecf