Signing back into the Community for the first time? You'll need to reset your password to access your account.  Find out more.

Forum Discussion

Former Member's avatar
Former Member
3 years ago

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

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

  • Jack_P_1P's avatar
    Jack_P_1P
    Icon for 1Password Team rank1Password Team

    Hi @njxgrxkxdrnlrymggeod:

    Thanks for reaching out about this! I see you've emailed us as well about this, so continuing the conversation there would be best. Thanks!

    Jack

  • Former Member's avatar
    Former Member

    Makes sense - thanks!

  • floris_1P's avatar
    floris_1P
    Icon for 1Password Team rank1Password Team

    @njxgrxkxdrnlrymggeod We've been exploring allowing for an authorization model that's more like the standard OpenSSH agent, which would allow for uses cases like the one you're describing, where the "per-application" model doesn't work well.

    If you're interested to take that for a spin, you can find more information in our Developer Slack workspace.