Learn R Programming

keyringr (version 0.4.0)

get_kc_account: Get a account name from macOS Keychain using the 'security' cli

Description

Get a account name from macOS Keychain using the 'security' cli

Usage

get_kc_account(label, type = "generic")

Arguments

label
Keychain password label
type
Leychain password type. Either "generic" or "internet".

Value

Returns the account value attached to the label. macOS may require the user to grant access to "security" the first time the function is run for each stored credential. It is important to select "Always allow", which will prevent similar dialogs in the future.

Examples

Run this code
## Not run: ------------------------------------
# # First store a set of credentials in Keychain
# # now return the account name to the R environment
# x <- get_kc_account("label")
## ---------------------------------------------

Run the code above in your browser using DataLab