testing from a 7-line cli
Commit
6cde7d8
#!/usr/bin/env bash tmp="$(mktemp -d)"; trap 'rm -f "$tmp"/*; rmdir "$tmp"' EXIT nonce="$(od -An -N16 -tx1 /dev/urandom | tr -d ' \n')" printf '%s\n%s\n\n%s' "$(date +%s)" "$nonce" "$*" > "$tmp/commit" ssh-keygen -Y sign -n devnull-commit -f "$HOME/.ssh/$DEV_NULL_KEY.pub" "$tmp/commit" </dev/null 2>&1 >/dev/null sig="$(grep -v -- '-----' "$tmp/commit.sig" | tr -d '\n')" curl --proto '=https' -sS --tlsv1.2 --max-time 30 \ -H "X-SSH-Signature: $sig" -H 'Content-Type: text/plain; charset=utf-8' \ --data-binary @"$tmp/commit" "https://dev-null.sh/api/cli/commits"
commit 6cde7d8