Search code examples
rpython-keyring

R keyring package - my keyring has disappeared (maybe), what happened to it and what keyring do I have now?


I've been using keyring reliably for months. All of a sudden, a bunch of scripts failed because my code to pull keys is returning nothing. I had a named keyring with a passcode. It appears to be gone.

When I run keyring::keyring_list I do have something though:

  keyring num_secrets locked
1                   9  FALSE

What is "1"? I think 9 is the number of secrets I had. But I can't figure out how to access this. I've tried keyring::key_list(keyring = NAME) where I used 1, "1" as names.

And what happened to my original keyring? How can I troubleshoot?

Edit: When the script runs via a batch file, I get this error:

Error in b_wincred_i_get(target) : 
  Windows credential store error in 'get': Element not found.

Calls: source ... b_wincred_parse_keyring_credential -> rawToChar -> b_wincred_i_get
Execution halted

I found one SO post (Error when using R to get credentials from Windows Cred Vault) that pointed me to make sure the credentials exist in Windows Credentials, I think they do ('credentials' is the name of the keyring):

enter image description here


Solution

  • I ended up having to re-create the ring, and create a process for backing up the keyring so that I can restore it if this happens again.

    enter image description here