git-credentials
Simple library to interact with Git Credentials
What it is and what it does
git-credentials is a lightweight Python wrapper around Git's built-in `git credential` command, allowing you to query, approve, and reject credentials programmatically. It provides a simple interface to interact with Git's credential storage system—whether that's the OS keychain, a credential helper, or plaintext storage—without needing to shell out to Git directly or parse its output yourself.
The package has no external dependencies beyond Git itself and is designed for scenarios where you need to retrieve stored credentials, validate them in code, and optionally store new ones back into Git's credential system. It's useful in automation scripts, CI/CD pipelines, or tools that need to authenticate with Git repositories but want to leverage Git's existing credential infrastructure rather than managing secrets independently.
Use it for:
- Retrieve stored Git credentials in a Python script to authenticate with a private repository.
- Validate credentials programmatically and tell Git whether they worked, updating its cache accordingly.
- Build automation tools that need Git credentials without hardcoding them or managing a separate secrets store.
- Implement custom credential workflows that integrate with Git's native credential helpers.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Wraps the `git credential` command to retrieve, store, and manage Git credentials from Python code without external dependencies beyond Git itself.
No. The package is abandoned (last release January 2022, last commit August 2022) with no maintenance signal. While it has low install friction and permissive licensing, the lack of updates means it may break with newer Python versions, Git releases, or edge cases. For credential management, prefer actively maintained alternatives or direct use of Git's credential system via subprocess calls with proper error handling.
Install
git-credentials on PyPI
pip
pip install git-credentialsuv
uv add git-credentialspoetry
poetry add git-credentialsInstalling git-credentials
Before you install
Low install friction with no runtime dependencies. However, the package is abandoned—last release was 2022-01-31 and last commit 2022-08-03—so expect no maintenance, bug fixes, or updates for newer Python versions or Git changes.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.
Quickstart
from git_credentials import GitCredentials, GitCredentialDescription
cred = GitCredentials("/path/to/repo")
response = cred.fill(GitCredentialDescription(
protocol="https",
host="example.com",
path="/"
))
print(response.username, response.password)
Git must be installed and available in PATH; the package is a thin wrapper around the `git credential` command.
Verify before relying
- Whether the package works reliably with modern Git versions and recent Python releases (3.10+) given the 2022 abandonment.
- Whether the package handles all edge cases in credential storage across different Git credential helper backends.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 1,656 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 163,581/month — #10,567 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: git_credentials-1.0.0-py3-none-any.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
docker-pycredsProvides Python bindings to interact with…
permissive · top 5,000 on PyPI
alibabacloud-credentials-apiProvides credential management interfaces and…
permissive · top 5,000 on PyPI
alibabacloud-credentialsManages authentication credentials for Alibaba…
permissive · top 5,000 on PyPI
jupyterlab-gitAdds Git version control integration directly…
permissive · top 15,000 on PyPI
truffleHogScans Git repositories and other sources for…
unclear · top 15,000 on PyPI
credstashCredStash stores and retrieves secrets using…
permissive · top 15,000 on PyPI
robocorp-vaultProvides read and write access to secrets…
permissive · top 15,000 on PyPI
boto3-assumeWraps boto3 to create AWS IAM assume-role…
permissive · top 15,000 on PyPI
tinynetrcRead, parse, and write .netrc credential files…
permissive · top 15,000 on PyPI
gimme-aws-credsA CLI tool that obtains temporary AWS…
permissive · top 15,000 on PyPI