Cannot push R Script to GitHub Repository

I am working RStudio and have been able to commit changes to an R Script that I am writing, but when I try to push to the GitHub Repository I get this error below:

/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 'https://github.com/elonerga/Test.git/'

I do have 2 factor authentication set up with GitHub and SSH.

Have you updated your git remote origin? if you do not update that, it is going to keep trying password authentication.

Thank you so much for your quick response! I am new to git and RStudio... I am not sure how to update the git remote origin. I just installed git this week. I am a Mac user.

If you're updating to use SSH, your URL might look like this:

git@github.com:USERNAME/REPOSITORY.git

In a terminal use the command

git remote set-url origin git@github.com:USERNAME/REPOSITORY.git

Obviously, change the URL with your actual USERNAME and REPOSITORY

Perfect!!! Thank you! I will try that.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.