Closed jkabisch closed 1 year ago
Hi,
Indeed, private repositories were not implemented. I will try to take a look into it in the next days.
Thank you. Here is a link to a restricted repo with some random files. simply request access if this helps you:
It would be a great enhancement.
I didn't have time before, but now it should work. You need to create a personal access token, and use that to access the files, something like: zenodo_get -r 8039248 -a TOKEN (I tried the above token, but didn't work for me, but when I created my own token for my own private data, then it works.)
The record?token= format is a bit messy, I didn't have much time to fix it, so maybe in the future, but for now '-a' should work. I pushed the new version to pypi, so you don't have to clone the repository. Let me know if it works or not.
Probably works. :)
Thank you very much for your excellent tool! I need to download files from repositories with restricted access. I cannot find a way to provide a private token to zenodo_get.
Expected behavior:
https://zenodo.org/record/8039248?token=eyJhbGciOiJIUzUxMiIsImV4cCI6MTY4OTQ1
Observed behavior:
./zenodo_get -r 8039248?token=eyJhbGciOiJIUzUxMiIsImV4cCI6MTY4OTQ1 Traceback (most recent call last): File "/home/jfk/.local/bin/./zenodo_get", line 8, in <module> sys.exit(zenodo_get()) File "/home/jfk/.local/lib/python3.10/site-packages/zenodo_get/zget.py", line 297, in zenodo_get files = js['files'] KeyError: 'files'