{"id":21382,"library":"git-credentials","title":"git-credentials","description":"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.","status":"active","version":"1.0.0","language":"python","source_language":"en","source_url":"https://github.com/theCapypara/python-git-credentials/","tags":["git","credentials","authentication","helper"],"install":[{"cmd":"pip install git-credentials","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Requires git executable in PATH","package":"git","optional":false}],"imports":[{"note":"Correct import path uses underscore in module name.","symbol":"GitCredentials","correct":"from git_credentials import GitCredentials"}],"quickstart":{"code":"from git_credentials import GitCredentials\n\ncred = GitCredentials(url='https://example.com')\n# Fill in credentials (typically after a prompt)\ncred.username = 'user'\ncred.password = 'pass'\n# Approve credentials (send to git credential approve)\ncred.approve()\n# To fetch credentials\nstored = cred.fill()\nprint(stored.username, stored.password)\n# Erase credentials\ncred.erase()","lang":"python","description":"Basic usage: create a GitCredentials object, set username/password, approve, fill, or erase."},"warnings":[{"fix":"Always pass at least url, path, or host keyword argument.","message":"GitCredentials constructor requires exactly one of url, path, or host. Missing required argument raises TypeError.","severity":"gotcha","affected_versions":"all"},{"fix":"Use environment variables or a vault for secrets.","message":"Credentials are stored in plaintext by Git; the library does no encryption. Do not store sensitive passwords in shared repositories.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Ensure you set both username and password before calling approve().","cause":"Calling approve() without setting username and password (or the object is incomplete).","error":"AttributeError: 'GitCredentials' object has no attribute 'approve'"},{"fix":"Upgrade git to version 2.6.0 or later.","cause":"Git version < 2.6.0 does not support credential helper protocol.","error":"git: 'credential' is not a git command."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}