diff --git a/graph/pull.go b/graph/pull.go index c01152a2485e65d70d4bc0338b7ada29b0ee803e..adad6f3239abf68d0eb60b8ab8455493f9c5d74d 100644 --- a/graph/pull.go +++ b/graph/pull.go @@ -74,7 +74,7 @@ func (s *TagStore) CmdPull(job *engine.Job) engine.Status { logName = utils.ImageReference(logName, tag) } - if len(repoInfo.Index.Mirrors) == 0 && ((repoInfo.Official && repoInfo.Index.Official) || endpoint.Version == registry.APIVersion2) { + if len(repoInfo.Index.Mirrors) == 0 && (repoInfo.Index.Official || endpoint.Version == registry.APIVersion2) { if repoInfo.Official { j := job.Eng.Job("trust_update_base") if err = j.Run(); err != nil { diff --git a/graph/push.go b/graph/push.go index 5a4f0d1de93b2f62b6f57636c7d057578feeeb74..f86df6d0b3c8cbcb5c319533f11f5785bb20a30f 100644 --- a/graph/push.go +++ b/graph/push.go @@ -539,7 +539,7 @@ func (s *TagStore) CmdPush(job *engine.Job) engine.Status { return job.Errorf("Repository does not exist: %s", repoInfo.LocalName) } - if endpoint.Version == registry.APIVersion2 { + if repoInfo.Index.Official || endpoint.Version == registry.APIVersion2 { err := s.pushV2Repository(r, localRepo, job.Stdout, repoInfo, tag, sf) if err == nil { return engine.StatusOK