File: cred_env.Rd

package info (click to toggle)
r-cran-git2r 0.31.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,288 kB
  • sloc: ansic: 8,283; sh: 4,116; makefile: 4
file content (50 lines) | stat: -rw-r--r-- 1,364 bytes parent folder | download | duplicates (3)
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/credential.R
\name{cred_env}
\alias{cred_env}
\title{Create a new environmental credential object}
\usage{
cred_env(username = NULL, password = NULL)
}
\arguments{
\item{username}{The name of the environmental variable that holds
the username for the authentication.}

\item{password}{The name of the environmental variable that holds
the password for the authentication.}
}
\value{
A list of class \code{cred_env} with entries:
\describe{
  \item{username}{
    The name of the environmental variable that holds
    the username for the authentication.
  }
  \item{password}{
    The name of the environmental variable that holds
    the password for the authentication.
  }
}
}
\description{
Environmental variables can be written to the file
\code{.Renviron}. This file is read by \emph{R} during startup,
see \code{\link[base]{Startup}}.
}
\examples{
\dontrun{
## Create an environmental credential object for the username and
## password.
cred <- cred_env("NAME_OF_ENV_VARIABLE_WITH_USERNAME",
                 "NAME_OF_ENV_VARIABLE_WITH_PASSWORD")
repo <- repository("git2r")
push(repo, credentials = cred)
}
}
\seealso{
Other git credential functions: 
\code{\link{cred_ssh_key}()},
\code{\link{cred_token}()},
\code{\link{cred_user_pass}()}
}
\concept{git credential functions}