Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error pulling docker image with singularity from gitlab container registry

I am trying to pull a docker image from my Gitlab container registry using singularity pull (as I want to use it singularity), but I get an error from singularity telling me that one file is not a tar archive. Indeed this file contains <?xml version='1.0' encoding='UTF-8'?><Error><Code>AuthenticationRequired</Code><Message>Authentication required.</Message></Error>.

Command that works: docker pull registry.gitlab.com/uit-sfb/metapipe/preprocess-reads:master.
Command that fails: singularity pull docker://registry.gitlab.com/uit-sfb/metapipe/preprocess-reads:master

The thing is that my repository is public and everyone has read access to it. So what am I missing??

like image 875
stackoverflowed Avatar asked Dec 02 '25 22:12

stackoverflowed


1 Answers

I am able to run singularity pull docker://registry.gitlab.com/uit-sfb/metapipe/preprocess-reads:master without issue, which suggests an environmental or authentication issue. If SINGULARITY_DOCKER_USERNAME or SINGULARITY_DOCKER_PASSWORD variables are set, singularity will attempt use them for all docker registries. Additionally, if you used singularity remote login docker://registry.gitlab.com with gitlab credentials valid for that repo/group but do not have container registry access you will also see an authentication issue.

  • Check your configured remotes and logout of the given registry if listed
singularity remote list
# Cloud Services Endpoints
# ========================
# 
# NAME         URI              ACTIVE  GLOBAL  EXCLUSIVE  INSECURE
# SylabsCloud  cloud.sylabs.io  YES     YES     NO         NO
# 
# Keyservers
# ==========
# 
# URI                     GLOBAL  INSECURE  ORDER
# https://keys.sylabs.io  YES     NO        1*
# 
# * Active cloud services keyserver
# 
# Authenticated Logins
# =================================
# 
# URI                           INSECURE
# docker://registry.gitlab.com  NO
#
singularity remote logout docker://registry.gitlab.com
  • Try running the pull command with a clean environment
env -i $(which singularity) pull docker://registry.gitlab.com/uit-sfb/metapipe/preprocess-reads:master

ref: Singularity + non Docker hub registries documentation

like image 136
tsnowlan Avatar answered Dec 04 '25 22:12

tsnowlan