Safe Password Entry for R, Git, and SSH
Clone or download
Latest commit a4da22b Jan 13, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
R Add example for CRAN Nov 28, 2018
img Add more screenshots Nov 17, 2018
inst Docs Nov 17, 2018
man Add example for CRAN Nov 28, 2018
src Fix warning on Solaris Jan 13, 2019
tests Export and docs Nov 17, 2018
.Rbuildignore Cleanup Nov 17, 2018
.gitignore Update gitignore Nov 17, 2018
.travis.yml Test legacy R Jan 2, 2019
DESCRIPTION bump Jan 13, 2019
LICENSE First commit Nov 17, 2018 First commit Nov 17, 2018
NAMESPACE Export askpass Nov 17, 2018
NEWS Fix warning on Solaris Jan 13, 2019 Readme Nov 18, 2018
appveyor.yml Enable Travis, AppVeyor Nov 17, 2018
askpass.Rproj First commit Nov 17, 2018


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:


This is used for example to read protected key files:

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

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:


R for MacOS


RStudio (server, desktop)


RGUI / Windows