skillfed

git-credentials

Simple library to interact with Git Credentials

git-credentials v1.0.0 163.6K downloads/30d#10,567 on PyPI1
Permissive license MIT Abandoned released

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-credentials

uv

uv add git-credentials

poetry

poetry add git-credentials

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

git credential managementretrieve git credentials pythongit password storagegit credential helpergit authentication interface
git-integrationcredential-managementabandoned

More Utilities packages