Skip to content

Commit

Permalink
GH-989: Handle osxkeychain rejecting the login request spuriously
Browse files Browse the repository at this point in the history
  • Loading branch information
ascopes committed Nov 15, 2024
1 parent 1156a26 commit 7f4ff5b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions helm/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"log"
"net/url"
"os"
"reflect"
"strconv"
"strings"
"sync"
Expand Down Expand Up @@ -508,10 +509,11 @@ func OCIRegistryPerformLogin(registryClient *registry.Client, ociURL string, use
debug("[INFO] Already logged into OCI registry %q", u.Host)
return nil
}
err = registryClient.Login(u.Host,
registry.LoginOptBasicAuth(username, password))

loginOpts := registry.LoginOptBasicAuth(username, password)
err = registryClient.Login(u.Host, loginOpts)
if err != nil {
return fmt.Errorf("could not login to OCI registry %q: %v", u.Host, err)
return fmt.Errorf("could not login to OCI registry %q: %v %v", u.Host, reflect.TypeOf(err), err)
}
loggedInOCIRegistries[u.Host] = ""
debug("[INFO] Logged into OCI registry")
Expand Down

0 comments on commit 7f4ff5b

Please sign in to comment.