Skip to content
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

Unlock keyring in (headless) scripts #121

Closed
khufkens opened this issue Aug 1, 2023 · 0 comments
Closed

Unlock keyring in (headless) scripts #121

khufkens opened this issue Aug 1, 2023 · 0 comments

Comments

@khufkens
Copy link
Member

khufkens commented Aug 1, 2023

To start a script as a batch job you will need to pass the keyring password and unlock the keyring for this session. In the past this would trigger an interactive prompt but for 'reasons' this seems not to work anymore. This is a workaround.

#!/usr/bin/env Rscript
args = commandArgs(trailingOnly=TRUE)

library("ecwmfr")

# set file based keyring and unlock with argument
options(keyring_backend="file")
keyring::keyring_unlock("appeears", args[1])
@khufkens khufkens pinned this issue Aug 3, 2023
@khufkens khufkens closed this as completed Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant