68

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?

8
  • 12
    Try git config --global credential.helper manager-core. Commented Apr 20, 2022 at 14:00
  • 2
    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. Commented Apr 21, 2022 at 9:12
  • 7
    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. Commented Apr 21, 2022 at 9:47
  • When I run "git config --global credential.helper store" I don't get any output, what should I see? Commented Apr 21, 2022 at 10:55
  • It does not print anything. Try git clone and it's expected to ask for username and password/token for once. Commented Apr 21, 2022 at 11:32

14 Answers 14

71

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

credential.helper=manager-core

-e means edit.

Sign up to request clarification or add additional context in comments.

6 Comments

great one! fixed it here... I was messing up with git and got in this situation. :D
Apparently it was renamed from manager-core to manager in 2.39. Hence removing this old 'manager-core' helps, just as changing it to 'manager' would (until they change it again...)
Thank you so much! I just updated from 2.35.x to 2.51.x after not caring for a long time, and faced the same issue... was driving me crazy!
The -e option will open an editor (whatever editor you set in git, or the default vim if you haven't set anything). I simply changed the line to credential.helper=manager instead of removing it, as I don't know what the default helper is. Like @arberg said, git renamed credential manger core to credential manager a few years ago . You can find out more here: github.com/git-ecosystem/git-credential-manager/blob/main/docs/…
On windows, just edit the .gitconfig file found in %USERPROFILE% folder.
54

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.

3 Comments

Thanks man! I've tired trying to fix that issue.
I tried that, didn't work for me on a remote linux machine
This didn't work for me in 2.44.0.windows.1, but below by @teemo did, stackoverflow.com/a/75596870/197141
39
> git credential-manager configure

fixed my issue with vscode under windows 10

2 Comments

works with win 11 also :)
Worked for me, thanks :)
18

I manually removed all the [credential] and [alias] from global and system config.

From system config for MINGW64 at C:\Program Files\Git\mingw64\etc\gitconfig, I deleted this section:

[credential]
    helper = manager-core

From global config for MINGW64 at C:\Users\<YourUsersFolder>\.gitconfig, I deleted these sections:

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

And I don't have this annoying message any more.

2 Comments

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
Likewise for myself. I had several entries in the [credentials] section, with an incomplete line, and a duplicate. Clearing them out manually solved it.
8

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

3 Comments

This works for me. I have permanent error on all actions (fetch, commit, etc) "git-credential-manager-core.exe: no such file or directory". After this command Fetch goes without problem
After I did so the annoying message become printing twice :)
I don't think this will work for me since I'm working on a remote (headless) machine where I can't have a login screen open up
6

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.

Comments

5

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.

Comments

5

This problem is caused by credential-manager-core changing the name to credential-manager.

Modify file .gitconfig, to solve the problem.

   [credential]
        helper = manager

Ref: Error "git: 'credential-manager-core' is not a git command. See 'git --help'" on every push. · Issue #2098 · fork-dev/TrackerWin

Comments

2

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.

Comments

2

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.

Comments

1

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.

Comments

1

Install GCM using Homebrew:

brew install --cask git-credential-manager

https://docs.github.com/en/get-started/getting-started-with-git/updating-credentials-from-the-macos-keychain

https://docs.github.com/en/get-started/getting-started-with-git/caching-your-github-credentials-in-git

Comments

0

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.

Comments

0

After trying all of these answers (and many others) to no avail, I finally worked out it was only 1 repo exhibiting the symptom. A-ha!

I looked at the repo's local config file (in my case, "D:\git\IRE\.git\config") and found the following:

[credential]
    username = wrong_user_name_here

This was overriding all higher level "gitconfig"/".gitconfig" files, and once I'd removed it, all was back to normal.

No idea how this particular repo got in this state, but maybe my resolution will help someone else not waste 3 hours of their life too!

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.