Registry / auth-security / git-credentials

git-credentials

JSON →
library1.0.0pypypi✓ verified 35d ago

Simple library to interact with Git Credentials. Version 1.0.0 enables reading, storing, and erasing credentials via the Git credential helper protocol. Low release cadence.

auth-securitydevops
Install & Compatibility
Where this runs
tested against v1.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.040s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.032s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Correct import path uses underscore in module name.

from git_credentials import GitCredentials

Basic usage: create a GitCredentials object, set username/password, approve, fill, or erase.

from git_credentials import GitCredentials cred = GitCredentials(url='https://example.com') # Fill in credentials (typically after a prompt) cred.username = 'user' cred.password = 'pass' # Approve credentials (send to git credential approve) cred.approve() # To fetch credentials stored = cred.fill() print(stored.username, stored.password) # Erase credentials cred.erase()
Debug
Known footguns
gotchaGitCredentials constructor requires exactly one of url, path, or host. Missing required argument raises TypeError.
gotchaCredentials are stored in plaintext by Git; the library does no encryption. Do not store sensitive passwords in shared repositories.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
14 hits · last 30 days
gptbot
4
ahrefsbot
4
claudebot
3
script
1
amazonbot
1
bytedance
1
Resources