Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update GitHub authentification token on Rstudio to match the new policy?

While pushing a commit to GitHub yesterday, I received an email from the GitHub team:

Basic authentication using a password to Git is deprecated and will soon no longer work. Visit https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information around suggested workarounds and removal dates.

Thanks, The GitHub Team

I don't understand a word of the help page... I did create a more secure access token a few months ago when they first announced the change in authentification, and entered it in the terminal of my mac. I thought that would be it. My question is: how to update an Rstudio session created when token weren't necessary to match the new access-token policy?

Thanks in advance for your help,
Rosalie

like image 351
Rosalie Bruel Avatar asked Feb 05 '21 14:02

Rosalie Bruel


1 Answers

I don't know how to validate user @r2evans' comment above, but indeed it worked! I already had a PAT token set, so I followed the steps in https://happygitwithr.com/credential-caching.html#credential-caching, starting at 10.2.1.1

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

I had to enter my account password (computer password), then it showed my current identification parameters. In the console, three choices appear:

1: Keep these credentials
2: Replace these credentials
3: See the password / token

Select 2 to replace the password/token (credentials), and voilà!

Thanks for the easy fix @r2evans.

like image 62
Rosalie Bruel Avatar answered Sep 28 '22 18:09

Rosalie Bruel