1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/credential.R
\name{cred_ssh_key}
\alias{cred_ssh_key}
\title{Create a new passphrase-protected ssh key credential object}
\usage{
cred_ssh_key(
publickey = ssh_path("id_rsa.pub"),
privatekey = ssh_path("id_rsa"),
passphrase = character(0)
)
}
\arguments{
\item{publickey}{The path to the public key of the
credential. Default is \code{ssh_path("id_rsa.pub")}}
\item{privatekey}{The path to the private key of the
credential. Default is \code{ssh_path("id_rsa")}}
\item{passphrase}{The passphrase of the credential. Default is
\code{character(0)}. If getPass is installed and private key
is passphrase protected \code{getPass::getPass()} will be
called to allow for interactive and obfuscated interactive
input of the passphrase.}
}
\value{
A list of class \code{cred_ssh_key} with entries:
\describe{
\item{publickey}{
The path to the public key of the credential
}
\item{privatekey}{
The path to the private key of the credential
}
\item{passphrase}{
The passphrase of the credential
}
}
}
\description{
Create a new passphrase-protected ssh key credential object
}
\examples{
\dontrun{
## Create a ssh key credential object. It can optionally be
## passphrase-protected
cred <- cred_ssh_key(ssh_path("id_rsa.pub"), ssh_path("id_rsa"))
repo <- repository("git2r")
push(repo, credentials = cred)
}
}
\seealso{
Other git credential functions:
\code{\link{cred_env}()},
\code{\link{cred_token}()},
\code{\link{cred_user_pass}()}
}
\concept{git credential functions}
|