Before configuring Git Credential Manager, ensure it is installed on your system. You can install it from your package manager or download it from the official GitHub repository.
Once installed, confirm that Git Credential Manager is available by running:
git-credential-manager --versionIf installed correctly, this command will display the installed version.
To securely store your credentials, you need to configure the credential store.
On Linux, the default storage option is secretservice. Configure it with:
git config --global credential.credentialStore secretserviceEnsure that the credential store is set correctly by running:
git config --global credential.credentialStoreThis should output:
secretserviceNow that the credential store is configured, you can securely save your credentials.
Run the following command to store credentials manually:
git-credential-manager storeWhen prompted, enter your GitHub credentials in the following format:
protocol=https
host=github.com
username=<your-username>
password=<your-personal-access-token>Press Enter after inputting the credentials to save them.
To check if credentials are stored correctly, try cloning a private repository or running:
git credential reject https://github.qkg1.topIf properly configured, Git should now authenticate automatically without prompting for credentials.