Provision a credential in Git's cache credential helper
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Michael Hanke aff07bb814
All checks were successful
Smoke test git-annex setup action / smoke-test (push) Successful in 18s
feat: support an additional timeout parameter
This allows for overiding Git default of 900s for caching a credential.
This is needed for longer-running workflows that require credential us
of a longer time span.
2026-11-24 13:36:50 +01:00
.datalad chore: initialize dataset 2026-09-16 09:42:40 +02:00
.forgejo/workflows feat: support an additional timeout parameter 2026-11-24 13:36:50 +01:00
.gitattributes chore: initialize dataset 2026-09-16 09:42:40 +02:00
.noannex chore: initialize dataset 2026-09-16 09:42:40 +02:00
action.yml feat: support an additional timeout parameter 2026-11-24 13:36:50 +01:00
LICENSE feat: initial draft of the action 2026-09-16 10:21:09 +02:00
README.md feat: support an additional timeout parameter 2026-11-24 13:36:50 +01:00

Forgejo Action for caching a Git credential

Configures Git's credential cache with the supplied credentials, either globally or for a specific repository.

The action is implemented such that it should also run on GitHub actions. However, no attempt is made to verify this, and it is purely based on the similarity of these two systems for the time being.

Usage

- name: Cache Git credential
  uses: https://hub.psychoinformatics.de/actions/cache-git-credential@v1

Parameters

The following optional parameters can be given via the with key. Example:

- name: Cache Git credential
  uses: https://hub.psychoinformatics.de/actions/cache-git-credential@v1
  with:
    repo: "aux/component1"
    ...
Name Default Description
username ${{ github.actor }} Username to store in Git's credential cache.
password ${{ github.token }} Password or access token to store in Git's credential cache.
url ${{ github.server_url }} Server URL associated with the credential.
repo Empty Path to the repository to configure locally. If omitted, the credential helper is configured globally.
timeout 900 Number of seconds credentials are kept in the cache.

License

MIT