Skip to content

Commit

Permalink
Warn when username incompatible with OAuth
Browse files Browse the repository at this point in the history
  • Loading branch information
hickford committed Apr 25, 2024
1 parent a0ba4bd commit baef999
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit baef999

Please sign in to comment.