title: JFrog Artifactory error: Pushing Docker images with manifest v2 schema 1 to this repository is blocked
body: <p>I have two docker repositories running on the same JFrog cloud account/instance.  One for internal release candidates and the other for potentially external GC releases.  I want to be able to build the docker images and push to the internal repository, let QA/UAT go to town, and then copy the image to the release repository.  I <em>don't</em> want to rebuild the image from source.  Unfortunately, when I try to pull, tag and then push the image, I'm getting an error:</p>
  
  <blockquote>
    <p>unauthorized: Pushing Docker images with manifest v2 schema 1 to this repository is blocked.</p>
  </blockquote>
  
  <p>Both repositories block schema 1 manifests, but I am pushing fine to the internal repository, so it doesn't make much sense I wouldn't be able to push <em>the same image</em> to the release repository.</p>
  
  <p>I've setup a pretty simple test to confirm (actual repository URLs censored):</p>
  
  <pre><code>% docker pull hello-world:latest
  latest: Pulling from library/hello-world
  0e03bdcc26d7: Pull complete
  ...
  % docker tag hello-world:latest internal-rc.jfrog.io/hello-world:1.0.0-beta
  % docker push internal-rc.jfrog.io/hello-world:1.0.0-beta
  The push refers to repository [internal-rc.jfrog.io/hello-world]
  9c27e219663c: Pushed
  ...
  % docker system prune -a
  ...
  Total reclaimed space: 131.8MB
  % docker image pull internal-rc.jfrog.io/hello-world:1.0.0-beta
  1.0.0-beta: Pulling from hello-world
  0e03bdcc26d7: Pull complete
  ...
  % docker image tag internal-rc.jfrog.io/hello-world:1.0.0-beta docker-release.jfrog.io/hello-world:1.0.0
  % docker image push docker-release.jfrog.io/hello-world:1.0.0
  The push refers to repository [docker-release.jfrog.io/hello-world]
  9c27e219663c: Layer already exists
  [DEPRECATION NOTICE] registry v2 schema1 support will be removed in an upcoming release. Please contact admins of the docker-release.jfrog.io registry NOW to avoid future disruption. More information at https://docs.docker.com/registry/spec/deprecated-schema-v1/
  unauthorized: Pushing Docker images with manifest v2 schema 1 to this repository is blocked. For more information visit https://www.jfrog.com/confluence/display/RTF/Advanced+Topics#AdvancedTopics-DockerManifestV2Schema1Deprecation
  </code></pre>
  
  <p>So I can upload the image fine to the first repository, and confirm that it is using schema 2:</p>
  
  <pre><code>{
    "schemaVersion": 2,
    "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
    "config": {
      "mediaType": "application/vnd.docker.container.image.v1+json",
      "size": 7004,
      "digest": "sha256:66f750f4871ba45724699d7341ee7135caba46f63fb205351197464a66b55eff"
  ...
  </code></pre>
  
  <p>Does that <code>mediaType</code> being v1 matter?  It seems like the manifest itself is version 2...  But I don't know how I would change that, or why it would be allowed in one repository but not the other.</p>
  
  <p>I'm using I believe the latest version of docker <code>Docker version 19.03.8, build afacb8b</code></p>
  
  <p>Anyone have any idea what's going on there?  Is the schema version being changed between when I upload it the first time and when I download it?  Or is it when I tag it or upload it the second time?</p>