Skip to content

Instantly share code, notes, and snippets.

@syrm
Created September 1, 2025 09:31
Show Gist options
  • Select an option

  • Save syrm/08f14383555e65e8192e255f8eaaf3e8 to your computer and use it in GitHub Desktop.

Select an option

Save syrm/08f14383555e65e8192e255f8eaaf3e8 to your computer and use it in GitHub Desktop.
1Password Git with PAT
[credential]
helper = !~/src/git-1password-credential.sh "login" "Item Name"
#!/bin/bash
PAT=$(op item get "$2" --field pat --reveal)
cat <<EOF
username=$1
password=$PAT
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment