support pushing to ghcr.io registry

Howdy, This is Richard at TAMU. I am investigating the use of container registries. This is because I have learned that Charliecloud team is able to teach the use of registries in the Tutorial that we are trying to schedule.

I was able to push an image to my personal GitLab registry ch-image push hello registry.gitlab.com/rarensu/ch-image-test:hello (success) (success)

However, when I tried the same thing with my personal GitHub registry, it failed. ch-image push hello ghcr.io/rarensu/ch-image-test:hello error: PUT failed: Invalid URL '/v2/rarensu/ch-image-test/blobs/upload/384a86f0-97af-4fa4-900f-bd5698a71979': No schema supplied. Perhaps you meant http:///v2/rarensu/ch-image-test/blobs/upload/384a86f0-97af-4fa4-900f-bd5698a71979?

I turned on verbose so I could see the HTTP actions.

In the GitLab case, the POST action to request an upload blob location got a response that contained a blob location URI. location: https://registry.gitlab.com/v2/rarensu/ch-image-test/blobs/uploads/... This was successfully used as the target of the subsequent PUT action to upload a blob.

However, in the GitHub case, the POST action response contained a blob location that was not in the form of a URI. location: /v2/rarensu/ch-image-test/blobs/upload/... The subsequent PUT action failed because of course, HTTP did not recognize it as a valid URI.

I suspect that this is due to GitHub using a different API specification. I do not know what the solution should be. Maybe complain to GitHub and get them to change their API specification to match GitLab? I wonder how the other container runtimes are handling this.

Richard Lawrence

Edited by reidpr
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information