-
Notifications
You must be signed in to change notification settings - Fork 25
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
"Incorrect password" when trying to download embargoed file #1455
Comments
@rcpeene Could you show the (non-exception) output from the script when run, particularly the part that asks you for a password etc.?
How are you providing the API key? |
@rcpeene, I have run into this myself, and because I don't really use my system keyring, I end up doing something like: $ export DANDI_API_KEY=<paste in API key here> and then the CLI will no longer prompt for passwords etc. Just be careful about who can see your screen etc., as you want to protect that key from unauthorized use by others. jwodder may have a more comprehensive solution but exporting your key to your shell should get you unstuck. |
@jwodder I apologize, I left this out of the snippet client = dandiapi.DandiAPIClient(token=dandi_api_key)
dandiset = client.get_dandiset(dandiset_id) |
@rcpeene The It seems you previously stored your API key in an encrypted keyring file on the system. You can remove this keyfile and start over by deleting |
This makes sense. On my local machine I already have the DANDI_API_KEY defined which is probably why I didn't have the problem. I still don't understand why entering my dandi api key into the keyring prompt returns 'incorrect password' though |
If you mean the "Please enter password for encrypted keyring" prompt, that's because it's not asking you for your API key. Encrypted keyfiles are well, encrypted, and that encryption involves a user-defined password that would have been set when you first created the keyfile, so now it's asking you for the password used to encrypt the keyfile so it can decrypt the file and retrieve the API key stored within. |
I've encountered this problem again. On dandihub, I have set DANDI_API_KEY as an environment variable and deleted the file at |
When I try on google colab, I instead get the following prompts: Please provide API Key for dandi: ******* Seems like keyring is being setup automatically? |
Hi @jwodder, I am able to reproduce this issue for an embargoed Dandiset on JupyterHub. I am not sure why I am being prompted for the API key since it is declared in the Steps to reproduce
|
Just to dismiss some confusion, @kabilar you are running
in two different cells? then I guess sessions are not shared etc, so effect of
alternatively, you could just set it in env within that ipython notebook: import os
os.environ['DANDI_API_KEY'] = "yourkey" before you Similarly the client = DandiAPIClient()
client.dandi_authenticate() which should prompt you for key if it is unknown. |
I am running a notebook on dandihub and trying to download an embargoed file that I have access to. Even when providing my dandi api key, I get a prompt to enter a keyring password. I don't know where to find such a password. I don't have this error when running locally or Google collab, just Dandihub.
And the error (After entering an empty password to the keyring prompt):
The text was updated successfully, but these errors were encountered: