gitcreds icon indicating copy to clipboard operation
gitcreds copied to clipboard

`gitcreds_set()` should check to make sure a credential helper is configured

Open tanho63 opened this issue 7 months ago • 1 comments

Hi! Fresh-starting a machine and was following the usethis guide, but ran into an issue where I forgot to set the credential helper to something before trying to set credentials via gitcreds::gitcreds_set():

R> gitcreds::gitcreds_list_helpers()
Error in new_git_error("git_error", args = args, stdout = out, status = attr(out,  : 
  System git failed: 
R> gitcreds::gitcreds_set()


? Enter password or token: my_github_token
-> Adding new credentials...
-> Removing credentials from cache...
-> Done.
R> gitcreds::gitcreds_get()
Error in throw(new_error("gitcreds_no_credentials", url = url)) : 
  Could not find any credentials

Should gitcreds_set() check to make sure at least one credential helper is configured before trying to set the credential?

tanho63 avatar Nov 30 '23 15:11 tanho63

That would indeed make sense. I have a feeling that this won't be easy to implement, but we should at least investigate.

gaborcsardi avatar Nov 30 '23 19:11 gaborcsardi