Skip to content

Commit

Permalink
Don't return errors from local keychain when creds are not found so t…
Browse files Browse the repository at this point in the history
…hat we can fallback to other credential helpers, if configured.
  • Loading branch information
iain-macdonald committed Aug 3, 2023
1 parent 271bd94 commit cf699cc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions service/keychain/local_keychain/local_keychain.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ package local_keychain

import (
"context"
"errors"
"flag"
"fmt"
"net"
Expand Down Expand Up @@ -122,7 +121,7 @@ func (kc *keychain) GetCredentials(host string, refspec reference.Spec) (string,
// Credentials were cached but have expired, remove them.
delete(kc.cache, refspec.String())
}
return "", "", errors.New("credentials not found")
return "", "", nil
}

func Keychain(ctx context.Context) *keychain {
Expand Down

0 comments on commit cf699cc

Please sign in to comment.