diff --git a/cmd/notation/notation b/cmd/notation/notation new file mode 100755 index 000000000..4c8d1fc92 Binary files /dev/null and b/cmd/notation/notation differ diff --git a/pkg/configutil/util.go b/pkg/configutil/util.go index 83d3236dc..1bb3e9b3a 100644 --- a/pkg/configutil/util.go +++ b/pkg/configutil/util.go @@ -34,9 +34,18 @@ func ResolveKey(name string) (config.KeySuite, error) { if err != nil { return config.KeySuite{}, err } + + // if name is empty, look for default signing key if name == "" { name = signingKeys.Default } + + // if name is still empty, return error + if name == "" { + return config.KeySuite{}, errors.New("default signing key not set." + + " Please set default singing key or specify a key name") + } + idx := slices.Index(signingKeys.Keys, name) if idx < 0 { return config.KeySuite{}, ErrKeyNotFound