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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.040s · 17.8MB
glibcpy 3.10–3.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.
GitCredentials
✓ from git_credentials import GitCredentials
Correct import path uses underscore in module name.
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()
Errors
Common errors & fixes
AttributeError: 'GitCredentials' object has no attribute 'approve'
Calling approve() without setting username and password (or the object is incomplete).
fixEnsure you set both username and password before calling approve().
git: 'credential' is not a git command.
Git version < 2.6.0 does not support credential helper protocol.
fixUpgrade git to version 2.6.0 or later.
Upgrade
Version history
1.0.0latest on PyPI · released Jan 31, 2022
Audit
Dependencies
gitrequiredRequires git executable in PATH