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.
git config --global credential.helper manager-core
. – Beastings$ 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.
– Rikagit 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 rungit config --global --unset credential.helper
to disable it. – Beastingsgit clone
and it's expected to ask for username and password/token for once. – Beastingsgit config --show-origin credential.helper
print? If it's not empty, it shows the value ofcredential.helper
and in which file it's configured. – Beastings