2

I'm having an issue pushing from RStudio to Github post update

When I try to push I get the following error:

/usr/local/git/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 https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: Authentication failed for 'https://github.com/aestanle/partner/'

Which I understand means that I need to enter a personal access token (PAT). I've followed the instructions from this post by going into my keychain access and entering the PAT I created.

This still didn't work nor did the happy git suggestion to enter the PAT directly into R Studio

gitcreds::gitcreds_set()
Error in new_git_error("git_error", args = args, stdout = out, status = attr(out,  : 
  System git failed: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

Any thoughts on what is going wrong or what else I could try?

as365
  • 41
  • 4
  • 1
    you're probably best served by using RSA keys; these instructions should work for GitHub https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent (leave the passphrase blank when when the cli tool asks if you'd like one the key pair is likely plenty sufficient for your needs and entering the passphrase each time is simply an annoyance) – ti7 Oct 25 '21 at 22:40
  • I suspect that at this point your OS X Keychain has both password and PAT, and https style access tries the password (first and only) and still gts the failure. I prefer to use ssh, not https; this puts all the authentication into ssh. Meanwhile the `xcrun` thing is probably just some missing developer-tools - every time I upgrade macOS the things seem to move and I have to re-install them... – torek Oct 25 '21 at 22:54
  • 1
    If you are getting "Invalid Developer Path" that means you're probably on a max. You'll want to install the mac developer tools to give you access to build tools. Try running `xcode-select --install` in the terminal to install XCode (see https://apple.stackexchange.com/questions/254380/why-am-i-getting-an-invalid-active-developer-path-when-attempting-to-use-git-a) – MrFlick Oct 25 '21 at 22:54

0 Answers0