Hi all, I'm trying to publish a flexdashboard to my company's rsconnect.
According to the documentation, in order to use pins from RSConnect one has to register the board first with something like
board_register_rsconnect(
name = "rsconnect",
key = Sys.getenv("CONNECT_API_KEY"),
server = Sys.getenv("CONNECT_SERVER"))
without which RSConnect throws an error that the pinboard is not available:
pin_get(name = "fmi", board = "local")
Error from RSConnect:
Error: pin 'fmi' not found in 'local' board
and
pin_get(name = "fmi", board = "rsconnect")
Error: Board 'rsconnect' not a board, available boards: local, packages
Ok, fair enough.
But for some reason, neither Sys.gentenv("CONNECT_API_KEY")
nor keyring::key_get("CONNECT_API_KEY")
seem to work on RSconnect; they work in my environment just fine, but not when publishing. The error returned is
Error: Invalid API key, the API key is empty.
Passing the explicit key does work, so the issue is not with the API key itself. The key and the server are stored in my ~/.Renviron
file, and I use them without problems for a variety of other solutions (including publishing non-pin stuff to RSconnect).
The only thing it seems to work is for non-interactive RMarkdown files but not for dynamic ones.
Any help welcome.