credentials
credentials copied to clipboard
Test with GCM Core
See https://github.blog/2020-07-02-git-credential-manager-core-building-a-universal-authentication-experience/
The credential manager automatically opens the browser and generates a token! It was entirely seamless.
This is what I did:
brew tap microsoft/git
brew cask install git-credential-manager-core
And then open R in a terminal Window (I'm not sure if it works in RStudio because it prompts if you want to open the browser. Need to figure out how to hook that up to an IDE menu).
library(credentials)
git_credential_forget()
set_github_pat()
# And then type: 1
update Note that the generated token is actually not a PAT but an OAuth app. To edit permissions you need to go to oauth apps and select Git Credential Manager
.

It does not work on windows with Git 2.29.1 the manager-core is apparently not detected:
git_credential_ask
does work though and gets the correct PAT