git-credential-store - Linux


git-credential-store manages Git credentials like usernames, passwords, and access tokens, protecting them from unauthorized access. It stores these credentials in an encrypted secure store and provides access through a standard interface for Git clients.


git credential-store [--version] [--help] [--quiet] [--debug] [--show]
                   [--remove] [--force] [--file <path>]
                   <protocol> [<host> [<path>]]


  • --version: Displays the version of git-credential-store.
  • --help: Prints the help message and exits.
  • --quiet: Suppresses any non-error output.
  • --debug: Enables debug logging.
  • --show: Lists all stored credentials.
  • --remove: Removes the specified credential.
  • --force: Forces the removal of a credential, even if it is the default credential for a protocol/host.
  • --file <path>: Specifies the path to the credential store file. Defaults to ~/.git-credentials.
  • <protocol>: The protocol for which credentials are being managed, e.g., https.
  • <host>: The hostname of the server for which credentials are being managed.
  • <path>: The path to the resource on the server for which credentials are being managed.


List all stored credentials:

git credential-store --show

Add credentials for a host:

git credential-store

Remove credentials for a host:

git credential-store --remove

Common Issues

Permission denied:

  • Ensure that the file permissions of ~/.git-credentials allow read/write access for the current user.

Missing input:

  • If no protocol, host, or path is provided, the command will prompt for input.


git-credential-store seamlessly integrates with Git clients. Once enabled, it will automatically manage Git credentials, eliminating the need to store them plaintext in the Git configuration file.

Related Commands

  • git-config: Configures Git settings, including credential manager.
  • git-credential-fill: Fills Git credentials from the store.
  • git-credential-approve: Approves a credential request.