Skip to content

Commit

Permalink
document use of PATs with Git (closes #1281)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinushey committed Feb 20, 2024
1 parent 85aded6 commit 6b13e12
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions vignettes/package-install.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ For example, the igraph package on GitHub at <https://github.com/igraph/rigraph>
renv::install("igraph=igraph/rigraph")
```


#### Azure DevOps

Authentication with Azure DevOps may require credentials to be set in a slightly different way. In particular, you can use:
Expand All @@ -330,6 +331,23 @@ GITHUB_PASS = <password>
replacing `<username>` and `<password>` as appropriate -- for example, your password may just be a PAT. See https://github.com/rstudio/renv/issues/1751 for more details.


#### Git and Personal Access Tokens

Rather than username + password, some remote Git repositories might require Personal Access Tokens (PATs) for authentication. Typically, such servers expect authentication credentials where:

- Your PAT is supplied as the username,
- Either an empty response, or the string `x-oauth-basic`, is provided as the password.

To help facilitate this, you can set:

```
GIT_USER = <pat>
GIT_PASS = x-oauth-basic
```

in an appropriate startup R file.


### Custom headers

If you want to set arbitrary headers when downloading files using renv, you can do so using the `renv.download.headers` R option.
Expand Down

0 comments on commit 6b13e12

Please sign in to comment.