diff --git a/pkg/provenance/sign.go b/pkg/provenance/sign.go index 4d379934dfb12371daf223684f052e9db244447b..ab0fa6ebec90ca05d0bb86ca07f504087823de8c 100644 --- a/pkg/provenance/sign.go +++ b/pkg/provenance/sign.go @@ -153,7 +153,7 @@ func NewFromKeyring(keyringfile, id string) (*Signatory, error) { // The Signatory must have a valid Entity.PrivateKey for this to work. If it does // not, an error will be returned. func (s *Signatory) ClearSign(chartpath string) (string, error) { - if s.Entity.PrivateKey == nil { + if s.Entity == nil || s.Entity.PrivateKey == nil { return "", errors.New("private key not found") }