#!/bin/sh # git credential helper for knots: answers with an atproto service auth # token for org.tangled.git.receivePack, made by your pds through goat [ "$1" = get ] || exit 0 host= while IFS='=' read -r key value; do [ -z "$key" ] && break [ "$key" = host ] && host=$value done token=$(goat account service-auth --aud "did:web:$host" --lxm org.tangled.git.receivePack | tail -n 1 | tr -d '[:space:]') [ -n "$token" ] || exit 1 echo username=x echo "password=$token"