Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Pilot Lvl 1
Message 1 of 35

Pushing docker image to GPR: manifest invalid: Only schema version 2 is supported

Solved! Go to Solution.

Since about an hour I'm getting the following error when I try to push a docker image tp GPR:

[DEPRECATION NOTICE] registry v2 schema1 support will be removed in an upcoming release. Please contact admins of the docker.pkg.github.com registry NOW to avoid future disruption. More information at https://docs.docker.com/registry/spec/deprecated-schema-v1/
manifest invalid: Only schema version 2 is supported

Two hours ago everything work fine, the Dockerfile hasn't changed, neither did the upstream image. Did Github change something an hour ago?

34 Replies
Highlighted
Copilot Lvl 2
Message 2 of 35

Re: Pushing docker image to GPR: manifest invalid: Only schema version 2 is supported

I also had things working, then they started failing.

 

From here there did seem to be someone who found tagging with the git sha was problematic (too many characters).

https://github.community/t5/GitHub-Actions/Can-t-push-to-GitHub-Docker-Registry-from-Actions/td-p/30...

 

 

Highlighted
Pilot Lvl 1
Message 3 of 35

Re: Pushing docker image to GPR: manifest invalid: Only schema version 2 is supported

Tried it with the following tags so I doubt it's the tag langth: `nieuwste`, `laatste`, `la`

 

Also interesting detail is that I'm building the image I'm building this image on publicly on Github Actions and push it to Docker Hub. (Frequently, in this case the base image was less then a day old.)

Highlighted
Copilot Lvl 3
Message 4 of 35

Re: Pushing docker image to GPR: manifest invalid: Only schema version 2 is supported

I have the same issue pushing to the Github repository but via CircleCI, can you update the version of docker client your using it the Github action for pushing... ( This may be a case of just updating the version of the GitHub action you're using for pubishing)

 

I think its just because the old API has been deprecated and we are still pushing using older versions of the api ?

 

I updated my docker image used to publish my image to Docker version 19.03.5, build 633a0ea838 with no success, build is still failing with the metadata error.

Copilot Lvl 2
Message 5 of 35

Re: Pushing docker image to GPR: manifest invalid: Only schema version 2 is supported

I tried your suggestion by trying to push outside of Github Actions. I'm currently on Docker version 19.03.2, build 6a30dfc on mac and I'm still getting the manifest invalid error. This may be caused by a different issue?

Highlighted
Copilot Lvl 3
Message 6 of 35

Re: Pushing docker image to GPR: manifest invalid: Only schema version 2 is supported

Sorry, I just got mine building with another version and had the same issue again.. Are people using the github private repo ?

 

I also don't know if it's worth noting that the docker manual says :

 

> When pushing images, clients which support the new manifest format should first construct a manifest in

> the new format. If uploading this manifest fails, presumably because the registry only supports the old

> format, the client may fall back to uploading a manifest in the old format.

 

This makes me think that it may be failing to upload using v2 then reverting to v1 where it then gets this error back from the server.

Highlighted
Pilot Lvl 1
Message 7 of 35

Re: Pushing docker image to GPR: manifest invalid: Only schema version 2 is supported

Yes I'm trying to push from a private repo to it's private repo. This fallback to v1 could be it, there is a noticeable delay after the last layer is pushed before the error shows up.

 

Nevermind that, for both success and failure the delay is 6 seconds. Success gives you the latest digest SHA And failure that error.

Highlighted
Copilot Lvl 3
Message 8 of 35

Re: Pushing docker image to GPR: manifest invalid: Only schema version 2 is supported

FYI, I sent a message detailing the issue github developer support, who have escalated the issue to the product team with the link to this community post.

 

I'll update if I hear back from them.

 

Update, I figured out my issue:

 

So nested in the logs ( journalctl ) is the actual issue:

 

Nov 20 09:42:08 blue-pont dockerd[427]: time="2019-11-20T09:42:08.376878027+11:00" level=warning msg="failed to upload schema2 manifest: unauthorized: This operation would exceed the storage allotment for this account. - falling back to schema1"
Nov 20 09:42:08 blue-pont dockerd[427]: time="2019-11-20T09:42:08.376989057+11:00" level=warning msg="[DEPRECATION NOTICE] registry v2 schema1 support will be removed in an upcoming release. Please contact admins of the docker.pkg.github.com registry NOW to avoid future disruption."
Nov 20 09:42:10 blue-pont dockerd[427]: time="2019-11-20T09:42:10.260794961+11:00" level=error msg="Not continuing with push after error: manifest invalid: Only schema version 2 is supported"

Seems our account is over the storage allocation ( I'm not the certain what this limit is ) and therefore we are no longer able to upload our images.

 

It is attempting to upload using schema 2 then failing and falling back, docker does not know how to handle the error from the github private repo and is therefor falling back in a reall confusing manner.

 

So i am not certain if we can delete older packages to free up space or what the limit is.

 

I used journalctl | grep dockerd (since I aways forget the flags) to get the full logs on Arch Linux, this will be different on OSX (https://docs.docker.com/docker-for-mac/troubleshoot/) or windows (https://docs.docker.com/v17.12/docker-for-windows/troubleshoot/).

 

But Docker will log the reason it falled back to the version 1 schema in its logs.

Highlighted
Copilot Lvl 3
Message 9 of 35

Re: Pushing docker image to GPR: manifest invalid: Only schema version 2 is supported

So nested in the logs ( journalctl ) is the actual issue:

 

Nov 20 09:42:08 blue-pont dockerd[427]: time="2019-11-20T09:42:08.376878027+11:00" level=warning msg="failed to upload schema2 manifest: unauthorized: This operation would exceed the storage allotment for this account. - falling back to schema1"
Nov 20 09:42:08 blue-pont dockerd[427]: time="2019-11-20T09:42:08.376989057+11:00" level=warning msg="[DEPRECATION NOTICE] registry v2 schema1 support will be removed in an upcoming release. Please contact admins of the docker.pkg.github.com registry NOW to avoid future disruption."
Nov 20 09:42:10 blue-pont dockerd[427]: time="2019-11-20T09:42:10.260794961+11:00" level=error msg="Not continuing with push after error: manifest invalid: Only schema version 2 is supported"

Seems our account is over the storage allocation ( I'm not the certain what this limit is ) and therefore we are no longer able to upload our images.

 

It is attempting to upload using schema 2 then failing and falling back, docker does not know how to handle the error from the github private repo and is therefor falling back in a reall confusing manner.

 

So i am not certain if we can delete older packages to free up space or what the limit is.

 

I used journalctl | grep dockerd (since I aways forget the flags) to get the full logs on Arch Linux, this will be different on OSX (https://docs.docker.com/docker-for-mac/troubleshoot/) or windows (https://docs.docker.com/v17.12/docker-for-windows/troubleshoot/).

 

But Docker will log the reason it falled back to the version 1 schema in its logs.

Highlighted
Copilot Lvl 3
Message 10 of 35

Re: Pushing docker image to GPR: manifest invalid: Only schema version 2 is supported

We are seeing the same error and we have fixed tag length. Started after a few days, it was working before. Hopefully some staff member can write here to give more information.