Skip to content
master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
R
Nov 28, 2018
img
Nov 17, 2018
Nov 17, 2018
man
Nov 28, 2018
Nov 17, 2018
Nov 17, 2018
Jan 13, 2019
Nov 17, 2018
Nov 17, 2018
Nov 17, 2018
Nov 18, 2018

README.md

askpass

Safe Password Entry for R, Git, and SSH

Build Status AppVeyor Build Status CRAN_Status_Badge CRAN RStudio mirror downloads

Cross-platform utilities for prompting the user for credentials or a passphrase, for example to authenticate with a server or read a protected key. Includes native programs for MacOS and Windows, hence no 'tcltk' is required. Password entry can be invoked in two different ways: directly from R via the askpass() function, or indirectly as password-entry back-end for 'ssh-agent' or 'git-credential' via the SSH_ASKPASS and GIT_ASKPASS environment variables. Thereby the user can be prompted for credentials or a passphrase if needed when R calls out to git or ssh.

Called from R

To invoke the password prompt manually use:

askpass::askpass()

This is used for example to read protected key files:

library(openssl)
key <- rsa_keygen()
write_pem(key, 'testkey.pem', password = 'supersecret')
read_key('testkey.pem')

Called from SSH / Git

The package also configures itself as the password entry back-end for ssh-agent and git-credential. The easiest way to test this is using the credentials package:

remotes::install_github("r-lib/credentials")
git_credential_ask('https://example.com')

R for MacOS

askpass-mac

RStudio (server, desktop)

askpass-rs

RGUI / Windows

askpass-rs

Terminal

askpass-rs

About

Safe Password Entry for R, Git, and SSH

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.