1

The following R script running on RHEL 7.7 is producing a "key is not a string (length 1 character)" error when executed from the command line using RScript. The password was successfully set within the R environment using key_set("TESTSERVICE","TESTUSER") to the default keyring and the password is accessible from the interactive R environment using key_get("TESTSERVICE","TESTUSER") but not when using Rscript (or R CMD BATCH). No results on SO or Google search with the error message.
Has anyone encountered this and resolved it?

test_keyring.R

library(keyring)
key_get("TESTSERVICE","TESTUSER")

Command: Rscript test_keyring.R

Output: Error: key is not a string (length 1 character) Execution halted

0 Answers0