There are multiple ways to install GCM on macOS, Windows, and Linux. Preferred installation methods for each OS are designated with a ⭐.
Note: If you have an existing installation of the 'Java GCM' on macOS and
you have installed this using Homebrew, this installation will be unlinked
(brew unlink git-credential-manager
) when GCM is installed.
brew install --cask git-credential-manager
After installing you can stay up-to-date with new releases by running:
brew upgrade --cask git-credential-manager
To uninstall, run the following:
brew uninstall --cask git-credential-manager
Download and double-click the installation package and follow the instructions presented.
To uninstall, run the following:
sudo /usr/local/share/gcm-core/uninstall.sh
Note: all Linux distributions require additional configuration to use GCM.
See the .NET tool section below for instructions on this installation method.
Download the latest .deb package*, and run the following:
sudo dpkg -i <path-to-package>
git-credential-manager configure
git-credential-manager unconfigure
sudo dpkg -r gcm
*If you'd like to validate the package's signature after downloading, check out the instructions here.
Download the latest tarball*, and run the following:
tar -xvf <path-to-tarball> -C /usr/local/bin
git-credential-manager configure
git-credential-manager unconfigure
rm $(command -v git-credential-manager)
*If you would like to validate the tarball's signature after downloading, check out the instructions here.
Ensure curl
is installed:
curl --version
If curl
is not installed, please use your distribution's package manager
to install it.
Download and run the script:
curl -L https://aka.ms/gcm/linux-install-source.sh | sh
git-credential-manager configure
Note: You will be prompted to enter your credentials so that the script can download GCM's dependencies using your distribution's package manager.
Follow these instructions for your distribution.
GCM is included with Git for Windows. During installation you will be asked to select a credential helper, with GCM listed as the default.
You can also download the latest installer for Windows to install GCM standalone.
Installing GCM as a standalone package on Windows will forcibly override the version of GCM that is bundled with Git for Windows, even if the version bundled with Git for Windows is a later version.
There are two flavors of standalone installation on Windows:
-
User (
gcmuser-win*
):Does not require administrator rights. Will install only for the current user and updates only the current user's Git configuration.
-
System (
gcm-win*
):Requires administrator rights. Will install for all users on the system and update the system-wide Git configuration.
To install, double-click the desired installation package and follow the instructions presented.
To uninstall, open the Settings app and navigate to the Apps section. Select "Git Credential Manager" and click "Uninstall".
To uninstall, open Control Panel and navigate to the Programs and Features screen. Select "Git Credential Manager" and click "Remove".
Git Credential Manager can be used with the Windows Subsystem for Linux (WSL) to enable secure authentication of your remote Git repositories from inside of WSL.
Please see the GCM on WSL docs for more information.
GCM is available to install as a cross-platform .NET tool. This is the preferred install method for Linux because you can use it to install on any .NET-supported distribution. You can also use this method on macOS if you so choose.
Note: Make sure you have installed version 8.0 of the .NET
SDK before attempting to run the following dotnet tool
commands. After installing, you will also need to follow the output instructions
to add the tools directory to your PATH
.
dotnet tool install -g git-credential-manager
git-credential-manager configure
dotnet tool update -g git-credential-manager
git-credential-manager unconfigure
dotnet tool uninstall -g git-credential-manager