1Password on Mastodon

Prompted for master password on every `git` request, despite 1Password being set to remember

njxgrxkxdrnlrymggeodnjxgrxkxdrnlrymggeod
Community Member

My Bash prompt is configured to run a git fetch whenever I cd into a Git repo, via this line in my .bashrc:

function __prompt_command() {
    if [ "${__new_wd:=$PWD}" != "${PWD}" ]; then
        ls
        [ -d ".git" ] && command -v git >/dev/null 2>&1 && ( git fetch --prune >/dev/null 2>&1 >/dev/null & )
    fi
    __new_wd=$PWD
}
PROMPT_COMMAND=__prompt_command

This is incredibly useful, as I don't need to remember to "git fetch" anymore.

I've configured 1Password to be my identity provider in my ~/.ssh/config, per the instructions in the app:

Host *
  IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"

The problem is that 1Password makes me authorize the SSH key every time I cd into a Git repo, which is very annoying. This is reproducible by simply doing:

cd $some_git_repo
cd ..
cd $some_git_repo
cd ..

etc.

I dumped the SSH Agent logs per https://developer.1password.com/docs/ssh/agent/troubleshooting/#prompt-frequency , and will submit them referencing this post. I suspect the problem is that the git process doing the fetch is considered a new process by 1Password (the SSH Agent logs say that the git process has a different PID each time). Unfortunately, this makes 1Password's SSH-Agent configuration too annoying to use, which is unfortunate because it's incredibly cool and I'm dying to use it!


1Password Version: 8.9.12 (build 80912004 on beta channel)
Extension Version: 2.5.1
OS Version: macOS 12.1
Browser:_ Chrome

Comments

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file