ReproNim / sfn2018-training

Materials for SfN 2018 training event
http://repronim.org/sfn2018-training
2 stars 5 forks source link

Update commands (or setup) to work with the recent "more secure" git annex #11

Closed yarikoptic closed 5 years ago

yarikoptic commented 5 years ago

An attempt to rerun all the reproin/datalad workflow in a VM with updated git-annex/datalad results in the following failure:

vagrant@nitrcce:~$ ././rerunall.sh
[INFO   ] Creating a new annex repo at /home/vagrant/lesson-03-01/localizer_scans 
create(ok): /home/vagrant/lesson-03-01/localizer_scans (dataset)
[INFO   ] Cloning https://github.com/datalad/example-dicom-functional.git [1 other candidates] into '/home/vagrant/lesson-03-01/localizer_scans/inputs/rawdata' 
install(ok): inputs/rawdata (dataset)                                                                                      
action summary:
  add (notneeded: 2, ok: 1)
  install (ok: 1)
  save (ok: 1)
subdataset(ok): inputs/rawdata (dataset)
[WARNING] Failed to load entrypoint neuroimaging: The 'python-xmp-toolkit; extra == "full"' distribution was not found and is required by datalad [__init__.py:resolve:774] 
[WARNING] Running addurl resulted in stderr output: Configuration does not allow accessing file:///home/vagrant/images/heudiconv.simg
download failed: Configuration does not allow accessing file:///home/vagrant/images/heudiconv.simg
git-annex: addurl: 1 failed

[ERROR  ] CommandError: command 'addurl'
| Error, annex reported failure for addurl (url='file:///home/vagrant/images/heudiconv.simg'): {'command': 'addurl', 'success': False, 'file': '.datalad/environments/heudiconv/image'} [containers_add(/home/vagrant/lesson-03-01/localizer_scans/.datalad/environments/heudiconv/image)] 
containers_add(error): /home/vagrant/lesson-03-01/localizer_scans/.datalad/environments/heudiconv/image (file) [CommandError: command 'addurl'
Error, annex reported failure for addurl (url='file:///home/vagrant/images/heudiconv.simg'): {'command': 'addurl', 'success': False, 'file': '.datalad/environments/heudiconv/image'}]
containers_add(error): /home/vagrant/lesson-03-01/localizer_scans/.datalad/environments/heudiconv/image (file) [no image at /home/vagrant/lesson-03-01/localizer_scans/.datalad/environments/heudiconv/image]
action summary:
  containers_add (error: 2)

It is because of

yarikoptic commented 5 years ago

ok, the easiest workaround is to run (some time before starting to use file:// urls)

git config --global 'annex.security.allowed-url-schemes' 'http https file'

I will add a command with explanation somewhere near the first use

yarikoptic commented 5 years ago

was resolved by #15