Crates.io | git-credential-github-app-auth |
lib.rs | git-credential-github-app-auth |
version | 0.2.0 |
source | src |
created_at | 2023-02-19 15:50:26.86198 |
updated_at | 2023-03-20 19:17:01.859847 |
description | Git credential helper using GitHub App authentication to provide Github tokens as credentials to Git. |
homepage | https://github.com/westphahl/git-credential-github-app-auth |
repository | https://github.com/westphahl/git-credential-github-app-auth |
max_upload_size | |
id | 789120 |
size | 44,651 |
Git credential helper using GitHub App authentication to provide Github tokens as credentials to Git.
The helper will cache the credentials and only request a new token when the previous one expired.
Create a Github App and install it on the repositor or account/organization.
The app needs to have at least read-only permission for the "Contents" of the repository.
You must also generate a private key for the app in order to make API requests.
Make sure the helper binary git-credential-github-app-auth
is in your path.
The authentication agent listens on a local Unix socket and can be started with
the following command:
git-credential-github-app-auth \
/run/user/1000/github-app-auth \
agent \
--app-id 1234 \
--key-path /path/to/app/private-key.pem
Configure the Git credential helper in ~/.gitconfig
:
[credential "https://github.com"]
helper = "github-app-auth /run/user/1000/github-app-auth client"
useHttpPath = true
To test that the authentication helper works, you can either clone a repo that
has the configured Github app installed or run git credential fill
directly and provide e.g. the
following input (note the extra newline at the end; see also expected
format):
protocol=https
host=github.com
path=westphahl/git-credential-github-app-auth.git