r-lib / keyring

:closed_lock_with_key: Access the system credential store from R
https://keyring.r-lib.org/
Other
196 stars 28 forks source link

Don't work with debian in docker? #51

Closed shizidushu closed 6 years ago

shizidushu commented 6 years ago

Run the following

> key_set("R-keyring-test-service", "donaldduck")
Error in warn_for_keyring(keyring) : 
  argument "keyring" is missing, with no default
In addition: Warning message:
In default_backend_auto() :
  Selecting ‘env’ backend. Secrets are stored in environment variables

Then this

> library(keyring)
> kb <- backend_secret_service$new()
> kb$is_available()
[1] FALSE

I run it in a rstudio server docker container. libsecret-1-dev has been installed.

Is this package works for a debian server system without GUI?

Here is sessionInfo

> sessionInfo()
R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 9 (stretch)

Matrix products: default
BLAS: /usr/lib/openblas-base/libblas.so.3
LAPACK: /usr/lib/libopenblasp-r0.2.19.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=C             
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] keyring_1.0.0

loaded via a namespace (and not attached):
[1] getPass_0.2-2    compiler_3.4.4   assertthat_0.2.0 R6_2.2.2         tools_3.4.4     
[6] rstudioapi_0.7   yaml_2.1.18      openssl_1.0.1 
DaveParr commented 6 years ago

Same symptoms, but running Ubuntu on aws.ec2

gaborcsardi commented 6 years ago

Is this package works for a debian server system without GUI?

Yes, but you still need X11. I.e. it does not work via RStudio Server currently.

gaborcsardi commented 6 years ago

Yes, but you still need X11. I.e. it does not work via RStudio Server currently.

Meaning, that the secret service backend does not work. The env backend and the new file backend (coming soon on CRAN) work on all systems.

imanuelcostigan commented 5 years ago

Has this issue been addressed so that you can using keyring on docker or something like the Windows sub-system for Linux (no X11)?

gaborcsardi commented 5 years ago

I don't know of any way to use a Linux credential store without X11, unfortunately. If you manage to start a secret service daemon and unlock the keyring without X11, then you can use keyring.

kaushiklakshman commented 5 years ago

Hi @gaborcsardi Is this new file backend version available on CRAN now? If not will installing from github allow me to use it? Thanks!

Yes, but you still need X11. I.e. it does not work via RStudio Server currently.

Meaning, that the secret service backend does not work. The env backend and the new file backend (coming soon on CRAN) work on all systems.

gaborcsardi commented 5 years ago

@kaushiklakshman it is indeed on CRAN.

gaborcsardi commented 5 years ago

See ?keyring::default_backend

kaushiklakshman commented 5 years ago

Thanks @gaborcsardi I figured it out eventually and deleted my comment