SBOHVM / RPiR

The Reproducible Programming in R course, developed by the School of Biodiversity, One Health and Veterinary Medicine at the University of Glasgow.
https://sbohvm.github.io/RPiR/
GNU General Public License v3.0
12 stars 2 forks source link

Add GITHUB_PAT instructions #128

Closed richardreeve closed 3 years ago

richardreeve commented 3 years ago

We should add the instructions for adding the PAT token to the end of the github instructions. I think it's just:

usethis::create_github_token()
gitcreds::gitcreds_set()

but we need to try it on a computer where it's not already configured.

soniamitchell commented 3 years ago

So... Gavin doesn't have an .Renviron file, so I tried gitcreds::gitcreds_set(), without any arguments. It says Enter password or token, so I entered a PAT and it says:

-> Adding new credentials...
-> Removing credentials from cache...
-> Done.

but doesn't seem to create an .Renviron file. From the help, it seems to be some kind of PAT manager? Like a keychain for PATs?

I know my way was a bit more complicated, but I'm uncertain what gitcreds_set() is supposed to do...

richardreeve commented 3 years ago

Well, if he then tries to install RPiR does it say it is using the PAT token when it downloads it?

soniamitchell commented 3 years ago

credentials::set_github_pat() seems to be the right function, but again.. it's not populating .Renviron...

soniamitchell commented 3 years ago

after trying both of the methods above, install_github() doesn't use the PAT

soniamitchell commented 3 years ago

I believe my way is the only true way :p and have updated the GitHub instructions accordingly, in a PR, requesting review.

soniamitchell commented 3 years ago

129