Skip to content

gitcreds should check git version #26

@MyKo101

Description

@MyKo101

I was trying to follow along with the Github credentials guide on usethis and when I got to the point of running gitcreds::gitcreds_set() I got the following error:

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

In this functions, there's a tryCatch() intending to grab gitcreds_no_credentials and return NULL, however the error being thrown here is not a gitcreds_no_credentials condition and so the error was seeping through. The code goes on to run gitcreds_set_new(url) if the condition is caught and I was getting the same error response.

It took me way too long to realise my git version was out of date and after updating the error went away.

It would be useful for gitcreds to check a user's git version at some point in the process because the error I was receiving was very uninformative.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions