'credential-manager' is not a git command

54.6k Views Asked by At

Am on Windows 10 64-bit running git version 2.33.1.windows.1 against Azure repos. Since my last update I get the following error when cloning a rep using TortoiseGit v2.13.0.1 (latest version).

git.exe clone --progress -v "https://[email protected]/FenergoProduct/FlareDocumentation/_git/FlareFenergoRegulationMargin" "C:\Flare\FlareFenergoRegulationMargin"
Cloning into 'C:\Flare\FlareFenergoRegulationMargin'...
git: 'credential-manager' is not a git command. See 'git --help'.

The most similar command is
credential-manager-core

Does anyone have a simply explanation of how to get rid of this?

11

There are 11 best solutions below

0
On

I edited the .gitconfig file in my user folder and found that it was containing an empty entry in the credential section:

[credential]
    helper = 
    helper = manager-core

I removed

    helper = 

and it fixed my issue.

3
On

I also faced this error. how ever I tried more methods and finally below command worked for me. when we replace all config details it will fix. after run below command and then after you can again try git commands like clone, pull, push etc.. then automatically prompt login screen. after login successfully you can work without any issue.

git config --global credential.helper manager-core --replace-all
0
On

You should check what version of git you are running: I ran into the same issue and figured that I was using MSys2's package of Git instead of GitForWindows, while crediential-manager is exclusive to Microsoft's port of Git.

Use where git in your shell to see the actual path used for git.exe:

❯ where git
C:\msys64\usr\bin\git.exe
C:\Program Files\Git\cmd\git.exe

Uninstall the MSys2 package for Git if the first line is pointing to msys64 instead of Program Files (like above):

❯ pacman -R git
checking dependencies...

Packages (1) git-2.41.0-1

Total Removed Size:  35.97 MiB

:: Do you want to remove these packages? [Y/n] Y
:: Processing package changes...
(1/1) removing git

This fixed the credential-manager for me:

❯ where git
C:\Program Files\Git\cmd\git.exe

❯ git credential-manager
Required command was not provided.

git-credential-manager

Usage:
  git-credential-manager [options] [command]

Options:
  --version       Show version information
  -?, -h, --help  Show help and usage information

Commands:
  get          [Git] Return a stored credential
  store        [Git] Store a credential
  erase        [Git] Erase a stored credential
  configure    Configure Git Credential Manager as the Git credential helper
  unconfigure  Unconfigure Git Credential Manager as the Git credential helper
  diagnose     Run diagnostics and gather logs to diagnose problems with Git Credential Manager
  azure-repos  Commands for interacting with the Azure Repos host provider

Note that you can't use GitHub without this credential-manager since August 13, 2021:

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
3
On

Execute git config --global -e and remove this line in the editor:

credential.helper=manager-core

-e means edit.

3
On

I started getting the same error messages for every service after my last upgrade. I made them go away by creating an alias for credential-manager.

git config --global alias.credential-manager "credential-manager-core"

Other than the error messages, the credential-manager seems to have been working correctly both before and after creating the alias.

0
On

credential.helper is related to credential management which stores user usernames and passwords.To unset this use the below command:

git config --global --unset credential.helper

This will remove the globally configured credential helper.

0
On

Curiously, I receive the same error message when trying to push to a branch that had been deleted on the origin side. Instead of git commit, git push works in this situation.

0
On

I read the answers and tinkered with the files - no-one has written the "why" however...

I don't know how it works, I've just been using git as part of Visual Studio with Azure Devops...

I found there are several gitconfig files on my computer, that was the main problem I didn't know where they all were... so I would change one but it wasn't having an effect.

  • C:\Users<myusername>.gitconfig
  • C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\etc\gitconfig
  • C:\Program Files\Git\etc\gitconfig

I opened each of these files and removed the entire [alias] section and the entire [credential] section... this made the errors go away

As far as I can tell the "credential helper" is a feature that is either deprecated, or no longer required due to integration into the main perhaps.

Given no-one has explained what it means or does or why it's there, all I can do is prod at it.

0
On
0
On

modified @Teemo and @Raptor's solutions slightly:

ran git config --global -e

and altered

[credential] helper = manager-core to [credential] helper = helper = manager

fixed my issue on windows 11.

2
On

So, no one answer helped me. What i did. I removed manually all section [credintial] and [alias] from global and system config. From system config for MINGW64 here: C:\Program Files\Git\mingw64\etc\gitconfig I deleted this section:

[credential]
    helper = manager-core

From global config for MINGW64 here: C:\Users<YourUsersFolder>.gitconfig I deleted this sections:

[alias]
    credential-manager = credential-manager-core
[credential]
    helper = manager-core

And I have no this annoing message any more