Issues with pushing from Rstudi to GIT.

After committing and pushing I am getting this message

/usr/bin/git push origin HEAD:refs/heads/master
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see Token authentication requirements for Git operations - The GitHub Blog for more information.
fatal: Authentication failed for 'mayarm2020/Datanew · GitHub'

My account was previously linked well with hitghub and was able to push files. However, it seem the token expired. I activated two factor authentication on githiub but I am not sure how I can get the connection back between them

System Information:

  • RStudio Edition: (Desktop or Server) 2021.09.1 Build 372

Hi, perhaps try using the usethis package for this: