From ca33d4d2effff63986038c94e69a7484ddfa1839 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Thu, 12 Sep 2024 16:39:57 +0100 Subject: fix(remote): generalise auth failure detection by using words or short phrases --- src/bin/git_remote_nostr/utils.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/bin/git_remote_nostr/utils.rs b/src/bin/git_remote_nostr/utils.rs index 40fe937..6e09851 100644 --- a/src/bin/git_remote_nostr/utils.rs +++ b/src/bin/git_remote_nostr/utils.rs @@ -298,9 +298,10 @@ pub fn error_might_be_authentication_related(error: &anyhow::Error) -> bool { for s in [ "no ssh keys found", "invalid or unknown remote ssh hostkey", - "all authentication attempts failed", - "Permission to", - "Repository not found", + "authentication", + "Permission", + "permission", + "not found", ] { if error_str.contains(s) { return true; -- cgit v1.2.3