Drycee
Drycee

Reputation: 31

Messed up line in some git config?

I've ran into an issue using Git on Windows.

If I push my local changes, I'm getting the following error:

git: 'credential-credential-store' is not a git command. See 'git --help'.

From what I understand, this is a line in the config, however I checked the --local, --system and --global, and they all don't contain that error.

global contains this same value, but without the error:

[credential]
helper = credential-store

I am kind of clueless at this point about which file is being used.

Using git within Linux subsystem for Windows does not give me the error.

I am new to this and would really like to understand what is happening here.

Upvotes: 2

Views: 286

Answers (2)

Drycee
Drycee

Reputation: 31

Answering my own question here because I found the error:

git push adds "credential-" to the "store" attribute in "helper = store" of the config to form the command.

So this would result in "credential-store".

For reasons I don't know I already had "helper = credential-store" in the config, so with git push it added it again forming "credential-credential-store" which is obviously not a valid command.

Deleting the "credential-" in the config fixed it.

Upvotes: 1

Seth
Seth

Reputation: 338

Git allows you to use a 'helper' to manage your remote login information so you don't have to type it in every time you go to push. There are several different options for this configuration which are operating system dependent. I think git is throwing the error because it is trying to run git credential-credential-store, which is not a valid git command.

If you want to store your credentials in a file, you can run

git config --global credential.helper "store --file ~/.gitcredential"

This will store your git credentials in a file located in your home directory. A better option on Windows might be to use

git config --global credential.helper manager

This will set up git to use git Git Credential Manager, which is provided on Windows to help manage various types of logins.

Upvotes: 0

Related Questions