bgctw
bgctw

Reputation: 1

Datalad: problems getting a subdataset from gitlab (redirect for credentials)

I set up a datalad repository at a gitlab instance that includes subdataset input.

After datalad clone https://gitlab.gwdg.de/thomas.wutzler/SesamFitSPP.jl.git SesamFitSPP and cd SesamFitsSPP I try to datalad get -n input.

However this results in the following error: (I had to remove the URLs to avoid SPAM classification)

install(error): /User/homes/twutz/tmp/SesamFitSPP/input (dataset) [Failed to clone from any candidate source URL. Encountered errors per each url were:
- gitlab.gwdg.de/thomas.wutzler/SesamFitSPP.jl.git/input
  CommandError: 'git -c diff.ignoreSubmodules=none clone --progress ...SesamFitSPP.jl.git/input /User/homes/twutz/tmp/SesamFitSPP/input' failed with exitcode 128 [err: 'Cloning into '/User/homes/twutz/tmp/SesamFitSPP/input'...
fatal: unable to update url base from redirection:
  asked for: ...SesamFitSPP.jl.git/input/info/refs?service=git-upload-pack
   redirect: https://gitlab.gwdg.de/users/sign_in']
- .../SesamFitSPP.jl.git/input/.git
  CommandError: 'git -c diff.ignoreSubmodules=none clone --progress .../SesamFitSPP.jl.git/input/.git /User/homes/twutz/tmp/SesamFitSPP/input' failed with exitcode 128 [err: 'Cloning into '/User/homes/twutz/tmp/SesamFitSPP/input'...
fatal: unable to update url base from redirection:
  asked for: .../SesamFitSPP.jl.git/input/.git/info/refs?service=git-upload-pack
   redirect: .../users/sign_in']]

I tried following the datalad credentials help to setup datalad to use git credentials and expected the datalad get command to work but the error persisted.

The subdataset seems to be set up correctly, because when I clone the repo from the file system instead of gitlab, the datalad get -n input command works.

What do I need to do/configure to get the subdataset (and information on configured annex-siblings)?

Upvotes: 0

Views: 90

Answers (1)

loj
loj

Reputation: 11

I believe chapter 8.6.4 Subdataset publishing of the DataLad Handbook covers the problem you are having. Here's the .gitmodules file of the repo you posted:

❱ cat .gitmodules
[submodule "input"]
        path = input
        url = ./input
        datalad-id = d678b999-4c25-4538-b640-bd25dfee1e48
[submodule "outputs"]
        path = outputs
        url = ./outputs
        datalad-id = 4c4e3b25-7c3e-43dc-bafc-a1e62d2073e5

You'll see that the URL is listed as ./input. Since there is no repository at https://gitlab.gwdg.de/thomas.wutzler/SesamFitSPP.jl/input (which the URL for the input submodule entry would resolve to), accessing the subdataset fails. You will need to publish the subdataset to GitLab as well and then update the submodule entry with the accessible GitLab URL.

Upvotes: 1

Related Questions