-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gitcreds should check git version #26
Comments
Hi, which version of gitcreds is this? I think the most recent version prints the output from git at least. Also, what was your git version before the upgrade? |
Unfortunately since I've updated my git version, I don't know which version of git I was actually using. Do you know if there is any way to find out which version I was using? Would it be in any of the I'm on gitcred version 0.1.0. I think that the |
gitcreds 0.1.1 prints the output of git, I believe. |
This is what I get for git 1.7.7:
Is this better? |
Checking the git version programmatically seems hard, because the git version strings are quite creative. E.g. my 1.7.7 prints this:
So I am afraid that we would do more harm with trying to parse these strings. |
Looking at the documentation for I think the git versions also all have the three standard parts (major.minor.patch) followed by other system-type versions (mine is now Something like this should work as a check:
I don't know a way to test this function with other versions of |
No, it is much older than that:
|
I've just had a quick look at the archive and it looks like
Is this error just forwarding on the error from |
I am not sure if it is possible to determine if the problem is an old git version. |
I was trying to follow along with the Github credentials guide on
usethis
and when I got to the point of runninggitcreds::gitcreds_set()
I got the following error:In this functions, there's a
tryCatch()
intending to grabgitcreds_no_credentials
and returnNULL
, however the error being thrown here is not agitcreds_no_credentials
condition and so the error was seeping through. The code goes on to rungitcreds_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'sgit
version at some point in the process because the error I was receiving was very uninformative.The text was updated successfully, but these errors were encountered: