Skip to content

typescript: add git-credential-code-storage helper#33

Open
cloudhead wants to merge 1 commit into
mainfrom
feature/git-credential-helper
Open

typescript: add git-credential-code-storage helper#33
cloudhead wants to merge 1 commit into
mainfrom
feature/git-credential-helper

Conversation

@cloudhead

@cloudhead cloudhead commented Jun 11, 2026

Copy link
Copy Markdown

Installs a Git credential helper bin that keeps token-free HTTPS remote URLs in Git config and mints a fresh short-lived JWT each time Git asks for credentials. Configure with:

git config credential.https://ORG.code.storage.helper code-storage
git config credential.https://ORG.code.storage.useHttpPath true

The helper reads PIERRE_PRIVATE_KEY_FILE or PIERRE_PRIVATE_KEY and PIERRE_TOKEN_TTL (default 1 hour).

> export PIERRE_PRIVATE_KEY_FILE=$HOME/.pierre/test.api.key

> git remote -v                                                                         
origin    https://pierre.code.storage/19ff8064-f66d-4b05-86a0-9a2e54b34ae6.git (fetch)
origin    https://pierre.code.storage/19ff8064-f66d-4b05-86a0-9a2e54b34ae6.git (push)

> which git-credential-code-storage 
/home/cloudhead/.npm/bin/git-credential-code-storage

> git ls-remote origin
6be2d8a3c23620bd1f4824f9932dbd5ce00f96f8    refs/heads/master

With debug:

> PIERRE_DEBUG=1 git ls-remote origin
git-credential-code-storage: signing with private key from /home/cloudhead/.pierre/test.api.key
git-credential-code-storage: acquiring git:write+git:read token for repo 19ff8064-f66d-4b05-86a0-9a2e54b34ae6 (org pierre, ttl 3600s)
git-credential-code-storage: token acquired for pierre.code.storage/19ff8064-f66d-4b05-86a0-9a2e54b34ae6.git
git-credential-code-storage: ignoring 'store' operation: only 'get' mints credentials
6be2d8a3c23620bd1f4824f9932dbd5ce00f96f8    refs/heads/master

@cloudhead cloudhead force-pushed the feature/git-credential-helper branch from a83beed to 8c2c408 Compare June 11, 2026 08:27
Installs a Git credential helper bin that keeps token-free HTTPS
remote URLs in Git config and mints a fresh short-lived JWT each
time Git asks for credentials. Configure with:

  git config credential.https://ORG.code.storage.helper code-storage
  git config credential.https://ORG.code.storage.useHttpPath true

The helper reads PIERRE_PRIVATE_KEY_FILE or PIERRE_PRIVATE_KEY and
PIERRE_TOKEN_TTL (default 1 hour).
@cloudhead cloudhead force-pushed the feature/git-credential-helper branch from 8c2c408 to d86d42b Compare June 11, 2026 08:39
@cloudhead cloudhead marked this pull request as ready for review June 11, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant