-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Seems to not be able to access/modify private repos with current github token? #19
Comments
@yarikoptic Correct. The token used by What token is used by DataLad's |
thank you for the analysis!!! for now just generated a new token with full
let's see if resolves |
now we are to
this one is about DANDI_API_KEY now I guess, but odd one -- are we using two different keys somehow or admin level api key gives us ability to list but not access assets? |
@yarikoptic Text assets aren't stored in git-annex, so they have to be downloaded (via |
gotcha... feels like we need to establish datalad provider to provide authorization header token for download of such assets -- will need to look into it later (busy atm). |
do we download there from API or S3 URL? |
@yarikoptic From an API URL: backups2datalad/src/backups2datalad/asyncer.py Lines 315 to 321 in e76c760
|
grr... I was certain I replied but response didn't post. We should proceed following way
as demonstrated in this script#!/bin/bash
cd "$(mktemp -d ${TMPDIR:-/tmp}/dl-XXXXXXX)"
set -eux
git init
git annex init
# generate config to ship along
mkdir -p .datalad/providers
cat >| .datalad/providers/dandi.cfg << EOF
[provider:dandi]
url_re = https?://api\.dandiarchive\.org/api/.*
authentication_type = http_token
credential = dandi
[credential:dandi]
type = token
EOF
git add .datalad/providers/dandi.cfg; git commit -m 'Added dandi provider config'
git annex initremote datalad type=external externaltype=datalad encryption=none autoenable=true uuid=cf13d535-b47c-5df6-8590-0793cb08a90a
git annex addurl --file dataset_description.json https://api.dandiarchive.org/api/dandisets/000403/versions/draft/assets/0cb481e5-b979-4eed-8ea4-9cd0d78276a3/download/
cat dataset_description.json
git annex whereis
|
|
|
@yarikoptic Which command uses the envvar? Is just running |
the one which needs to access our api server to download files -- |
@yarikoptic But how should I supply the API key to git-annex when testing that this setup lets the program download embargoed text files? |
I might be missing smth -- through the |
@yarikoptic I think I'm just going to pass the token to the |
@yarikoptic How can I check whether the |
@yarikoptic How should the |
(it is
|
Should I handle this case by enabling or re-adding the remote somehow? |
you can, or just read from ❯ grep -A2 'remote "datalad"' .git/config
[remote "datalad"]
annex-externaltype = datalad
annex-uuid = 1e41b9cf-4479-4ef1-8c66-e6cfbf861f2e
❯ git config remote.datalad.annex-uuid
1e41b9cf-4479-4ef1-8c66-e6cfbf861f2e
❯ git remote remove datalad
❯ git annex enableremote datalad
enableremote datalad ok
(recording state in git...) |
@yarikoptic So, to summarize:
|
@jwodder please be more decisive and decide on what is needed to be done
I think this should cover all the cases we should care about |
@yarikoptic Your original script uses the UUID cf13d535-b47c-5df6-8590-0793cb08a90a for the |
sorry -- that was the paste error I guess -- it should be the cff13 one: ❯ pwd
/home/yoh/proj/datalad/datalad-maint
❯ grep DATALAD_SPECIAL_REMOTE datalad/consts.py
DATALAD_SPECIAL_REMOTE = 'datalad'
DATALAD_SPECIAL_REMOTES_UUIDS = {
DATALAD_SPECIAL_REMOTE: 'cf13d535-b47c-5df6-8590-0793cb08a90a', although really what matters is the name |
Pass credentials to git-annex for downloading embargoed text assets
although we do have private https://github.com/dandisets/000224
The text was updated successfully, but these errors were encountered: