28

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://FenergoProduct@dev.azure.com/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?

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
oceanclub
  • 477
  • 1
  • 4
  • 13
  • 9
    Try `git config --global credential.helper manager-core`. – ElpieKay Apr 20 '22 at 14:00
  • Thanks - unfortunately that doesn't seem to work (note the command doesn't give any output): `$ git config --global credential.helper manager-core` `$ git pull` `git: 'credential-manager' is not a git command. See 'git --help'.` `The most similar command is` ` credential-manager-core` `Already up to date.` – oceanclub Apr 21 '22 at 09:12
  • It seems something is wrong with your Windows Credential Manager. Try `git config --global credential.helper store`. It stores the username and password/token in `~/.git-credentials` by default. If you don't want the credential helper, you could also run `git config --global --unset credential.helper` to disable it. – ElpieKay Apr 21 '22 at 09:47
  • When I run "git config --global credential.helper store" I don't get any output, what should I see? – oceanclub Apr 21 '22 at 10:55
  • It does not print anything. Try `git clone` and it's expected to ask for username and password/token for once. – ElpieKay Apr 21 '22 at 11:32
  • I tried completely uninstalling then reinstalling Git with no results. When I look at Credential Manager in Windows I see under "Generic Credential" a number of values prefixed with "git:". Should I remove these and try again? – oceanclub Apr 22 '22 at 16:31
  • I further tried the following: 1) Deleted Git entirely, including related files in C:\Users\ such as .gitconfig. 2) Removed any git credentials from the Windows Credential Manager. 3) Reinstalled git. 4) Ran "git credential-manager-core unconfigure " 5) Ran (as suggested above) git config --global credential.helper store. 6) Ran (as suggested above) git config --global --unset credential.helper. In all cases I still get the error in the thread subject line when I run a "git pull" – oceanclub Apr 25 '22 at 10:32
  • What does `git config --show-origin credential.helper` print? If it's not empty, it shows the value of `credential.helper` and in which file it's configured. – ElpieKay Apr 25 '22 at 10:46

6 Answers6

33

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.

Big Ed
  • 1,056
  • 9
  • 20
6

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
4

git config --global -e remove this line: credential.helper=manager-core

Teemo
  • 211
  • 2
  • 6
4

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

  • This is what worked for me. My repo server is gitlap. I have the following lines on my .gitconfig file: ```[credential "https://server_address.ipip.com"] provider = generic``` – piedramania Jul 26 '23 at 04:57
0

This command "git config --global credential.helper manager-core" works for me. On my company's computer, I got the errors every time I changed my password. Before I was able to fix the errors through the Credential Manager, but not anymore.

Louis
  • 660
  • 1
  • 7
  • 14
0

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.
Poppolopoppo
  • 103
  • 1
  • 7