Skip to content

Managing GIT credentials

Martina Morris edited this page Dec 15, 2021 · 3 revisions

Note: these things do change over time, so if the links are broken, let @martinamorris know.

Create your PAT

2 ways to do this:

  1. On GitHub Instructions here

  2. With the usethis package Instructions here

Store your PAT

The easiest way to add the GIT credentials to your environment is to use one of the credential manager packages, because the protocols keep changing, and the packages will usually keep current so you don't need to.

Using the gitcred package Instructions here

install.packages("gitcreds")
library(gitcreds)
gitcreds::gitcreds_set()

Add your PAT

Modifying password authentication (if necessary)

PATs expire, and to replace yours you just need to repeat the process, and

gitcreds_set()

select  "replace these credentials" Put in your PAT. Restart R.

Clone this wiki locally