Container Registry: Manifest creation fails due to error 401 mounting blobs for cross-repository push with manifest-tool

Summary

Using "manifest-tool" from https://github.com/estesp/manifest-tool, docker multi-arch manifests cannot be created as mounting blobs for cross-repository push fails with http error 401.

This issue has also been reported on the manifest-tool project at https://github.com/estesp/manifest-tool/issues/53

Steps to reproduce

Run the test-registry.sh script provided by https://github.com/estesp/manifest-tool against a GitLab Container Registry project.

Example Project

registry.gitlab.com/craiggardener/alpine

What is the current bug behavior?

manifest-tool reports:

Couldn't mount blobs for cross-repository push: Blob mount failed to url https://registry.gitlab.com/v2/craiggardener/alpine/alpine/blobs/uploads/?from=craiggardener%2Falpine%2Fppc64le_alpine&mount=sha256%3Adaa414b19dcffa0ba7b80abb50a6b31156f1efd7bb1b8cdaeeb848da367afa38: HTTP status 401

GitLab's registry log shows:

level=warning msg="error authorizing context: authorization token required"

What is the expected correct behavior?

The request should not fail with http error 401.

Possible fixes

Is there any GitLab specific configuration or changes that are required to the authorisation process to make this work?

/label ~bug /label ~"container registry" /label support request

Edited by Craig Gardener