Go library providing high-level Notary API for go-containerregistry.
import "github.com/simonshyu/notary-gcr/pkg/gcr"
Construct a new Trusted GCR Repository, then use the various action support by the Repository. For example:
registryAuth := &authn.Basic{...}
notaryAuth := &authn.Basic{...}
ref, _ := name.ParseReference("docker-registry.com/foo/image:latest", name.WeakValidation)
trustedRepo, _ := gcr.NewTrustedGcrRepository("~/.notary", ref, registryAuth, notaryAuth)
Since google/go-containerregistry
does not support token authentication yet, so if your notary server enable auth
, this library may not work.