Open RossBoylan opened 7 months ago
I would try to remove all github tokens from the credential store (after backing them up if you want that), and then add the new token with gitcreds_set()
.
Thanks. That worked.
I do notice this message on pushes:
>>> C:/Programs/Git/bin/git.exe push origin HEAD:refs/heads/main
git: 'credential-manager-core' is not a git command. See 'git --help'.
I don't know if it's related to my original problem.
So my problem is fixed, but it would be nice if the code could cope with my original situation.
I think that message means that your setup is / was in a broken state, so it is unlikely that we can reproduce and support that.
I think you have two credential helpers set up, and one of them is not in a working state, so you could try to
I am not sure which credential helpers I have installed, which of them might be broken, or how to remove "extra" helpers. Can you (or anyone) provide additional guidance?
As I reported, in R
> gitcreds::gitcreds_list_helpers()
[1] "manager" "manager-core"
On the other hand, the git credentials
man page suggests
$ git help -a | grep credential-
credential-cache Helper to temporarily store passwords in memory
credential-store Helper to store credentials on disk
credential-helper-selector
credential-manager
which is different. And git help credential-manager
, recommended by the man page, finds no documentation; there is also none for credential-manager-core
.
Finally, here's my config:
$ git config --show-origin --get-regexp credential
file:C:/Programs/Git/etc/gitconfig credential.helper manager
file:C:/Programs/Git/etc/gitconfig credential.https://dev.azure.com.usehttppath true
file:C:/Users/rdboylan/.gitconfig credential.helper manager-core
It looks as if git for Windows has a default credential helper of manager
, but something set my account to use manager-core
.
The last 2 chunks are from a git bash shell under MS-Windows; R
, RStudio
, or VSCode
may be adding additional wrinkles.
Problem
gitcreds_set()
doesn't seem to be setting anything:Trying
gitcreds_get
in a new session later yields the same resultBackground Information
Based partly on questions developers asked in a somewhat similar bug, I installed
oskeyring
and collected additional info:Running under RStudio 2023.06.1+524 "Mountain Hydrangea" Release (547dcf861cac0253a8abb52c135e44e02ba407a1, 2023-07-07) for windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2023.06.1+524 Chrome/110.0.5481.208 Electron/23.3.0 Safari/537.36
R version 4.3.1 (2023-06-16 ucrt) git version 2.43.0.windows.1 gitcred 0.1.2
So both
RStudio
andR
are a little behind current.I have accessed github in various ways, including ssh, from various applications. In Windows Credential Manager (under Windows Credentials | Generic Credentials) I see at least 5 entries associated with github.com, 3 of which were last modified today. I also see that Windows and Certificate-Based Credentials both say "have been disabled by your system administrator".