gitcreds
gitcreds copied to clipboard
gitcreds_set() appears ineffective
Problem
gitcreds_set()
doesn't seem to be setting anything:
> gitcreds::gitcreds_set()
? Enter password or token: ghp_XXXX
-> Adding new credentials...
-> Removing credentials from cache...
-> Done.
> usethis::gh_token_help()
* GitHub host: 'https://github.com'
* Personal access token for 'https://github.com': <unset>
* To create a personal access token, call `create_github_token()`
* To store a token for current and future use, call `gitcreds::gitcreds_set()`
i Read more in the 'Managing Git(Hub) Credentials' article:
https://usethis.r-lib.org/articles/articles/git-credentials.html
> gitcreds::gitcreds_get()
Error in throw(new_error("gitcreds_no_credentials", url = url)) :
Could not find any credentials
Trying gitcreds_get
in a new session later yields the same result
Background Information
Based partly on questions developers asked in a somewhat similar bug, I installed oskeyring
and collected additional info:
> gitcreds::gitcreds_list_helpers()
[1] "manager" "manager-core"
> gitcreds::gitcreds_list()
[[1]]
<oskeyring_windows_item: generic>
target_name: git:https://[email protected]
persist: local_machine
username: RossBoylan
credential_blob: <-- hidden -->
[[2]]
<oskeyring_windows_item: generic>
target_name: git:https://github.com
persist: local_machine
username: Personal Access Token
credential_blob: <-- hidden -->
[[3]]
<oskeyring_windows_item: generic>
target_name: git:https://[email protected]
persist: local_machine
username: PersonalAccessToken
credential_blob: <-- hidden -->
Warning message:
In gitcreds$throw(gitcreds$new_warning("gitcreds_multiple_helpers")) :
Multiple credential helpers, only using the first
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
and R
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".