From baef999395425f9c7c7ce616e72243a855aa6244 Mon Sep 17 00:00:00 2001 From: M Hickford Date: Thu, 25 Apr 2024 22:00:00 +0100 Subject: [PATCH] Warn when username incompatible with OAuth --- main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.go b/main.go index ac5431f..8db31dc 100644 --- a/main.go +++ b/main.go @@ -308,6 +308,9 @@ func main() { } if username != "" { output["username"] = username + if pairs["username"] != "" && pairs["username"] != username { + fmt.Fprintf(os.Stderr, "Username '%s' is incompatible with OAuth. This frustrates retrieval of stored OAuth credentials. Please remove username from remote URL and unset config key credential.username.\n.", pairs["username"]) + } } if !token.Expiry.IsZero() { output["password_expiry_utc"] = fmt.Sprintf("%d", token.Expiry.UTC().Unix())