This worked, although the url in the browser returns a 404.
bazel build //example:hello-world --registry=http://my.gitlab/my_group/bazel-central-registry/raw/dev