Open a Git push on a website, app, agent, or skill that exists: a branch of its repository, writable for one hour, that you push source to before you publish. Use it when you can run git with network access; it sends only what changed, so a large service publishes without carrying its files through the conversation. Otherwise publish with files. The service must exist first: create_service makes it.
A push needs the SHA-256 of a Git key that stays on your machine, as key_sha256; never send the key or put it in a command. This recipe makes a new key for this push in its own mode-600 file, never reusing one, and prints the file's path, then the hash:
umask 077; d="$HOME/.config/valet/git-keys"; mkdir -p "$d"; chmod 700 "$d"; f=$(mktemp "$d/key.XXXXXX") && head -c 32 /dev/urandom | od -An -tx1 | tr -d ' \n' > "$f" && echo "$f" && (sha256sum 2>/dev/null || shasum -a 256) < "$f" | cut -d' ' -f1
The result carries a Git URL with no credential, the push's id and branch, the commit it starts from, the name and email to commit as, the limits, and two recipes that read your key from the file: clone the branch and edit, or push a directory as it stands. A push over the limits is refused. Run a recipe, then call publish_site, publish_app, publish_agent, or publish_skill with push: {id, commit}, where commit is the sha the recipe prints. When the push is published, delete this push's key file, and only it: rm -f "$VALET_GIT_KEY_FILE". Only you can publish a push you opened. The key writes only this push's branch, cannot force-push, and expires with the push. Calling again with the same idempotency_key and a different key_sha256 replaces the push's key, so the earlier key stops working for that push. A service holds ten open pushes at once. Requires connecting a Valet account.