Linux command
git-credential-store 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Store credentials in file
git config credential.helper store
Store in specific file
git config credential.helper 'store --file ~/.git-credentials'
说明
git credential-store is a credential helper that permanently stores authentication credentials in a plain-text file on disk. By default, credentials are stored in ~/.git-credentials, but a custom path can be specified with the --file option. When configured, it saves credentials after the first successful authentication and automatically provides them for subsequent operations. The file format is simple: each line contains a URL with embedded credentials in the form https://username:password@hostname/path. While convenient for eliminating password prompts permanently, this approach has significant security implications. Credentials are stored unencrypted and readable by anyone with filesystem access. For better security, consider platform-specific alternatives like macOS Keychain, Windows Credential Manager, or git-credential-cache for temporary memory-only storage.
参数
- --file _path_
- Credential file path.
FAQ
What is the git-credential-store command used for?
git credential-store is a credential helper that permanently stores authentication credentials in a plain-text file on disk. By default, credentials are stored in ~/.git-credentials, but a custom path can be specified with the --file option. When configured, it saves credentials after the first successful authentication and automatically provides them for subsequent operations. The file format is simple: each line contains a URL with embedded credentials in the form https://username:password@hostname/path. While convenient for eliminating password prompts permanently, this approach has significant security implications. Credentials are stored unencrypted and readable by anyone with filesystem access. For better security, consider platform-specific alternatives like macOS Keychain, Windows Credential Manager, or git-credential-cache for temporary memory-only storage.
How do I run a basic git-credential-store example?
Run `git config credential.helper store` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --file _path_ do in git-credential-store?
Credential file path.