fix(auth): Fix ssh authentication

Signed-off-by: Yves Galante <yyvess@gmail.com>
This commit is contained in:
Yves Galante 2024-04-04 17:15:15 +02:00 committed by Yves Galante
parent e8305c895f
commit 28b8f36746
No known key found for this signature in database
GPG Key ID: 777A0C24A6C7225A
1 changed files with 1 additions and 1 deletions

View File

@ -572,7 +572,7 @@ func main() {
if *flUsername == "" {
// username and user@host URLs are validated as mutually exclusive
if u, err := url.Parse(*flRepo); err == nil { // it may not even parse as a URL, that's OK
if u.User != nil {
if u.User != nil && u.Scheme != "ssh" {
if user := u.User.Username(); user != "" {
*flUsername = user
}