Hi. I keep seeing the “Unlock SSH key” prompt many times a day while using Cursor in Agent Window.
What is confusing is that I am not using GitHub at those moments. I am just using the AI chat for questions (not even related to coding). I am not pushing, pulling, cloning, or running GitHub commands.
Steps to Reproduce
Open Cursor in Agents Window.
That’s it.
Expected Behavior
I would like to not see this prompt and at the same time keep my passphrase secret.
Hey, thanks for the detailed report. This is expected behavior: when you switch chats or Cursor is running in the background, the Agent Window can trigger git remote operations like resolving branches or PRs, even if you’re just chatting. Your SSH key is protected with a passphrase, and it isn’t cached between operations, so the Unlock SSH key prompt keeps showing up.
Workaround on macOS is to load the key into ssh-agent via Keychain. Then the passphrase is requested once per login session, not for every operation.
After that, the passphrase is stored in macOS Keychain. It stays secret and background git operations in Cursor should stop asking for it.
If the prompt still gets in the way, you can also set git.autofetch: false, or git.useIntegratedAskPass: false. The second option removes the in-window modal and switches back to the standard system SSH auth flow.
The repeated prompt in the Agent Window is a bug on our side, and it’s on our radar. I can’t share an ETA for a fix yet. Let me know if the workaround helped.
git.autofetch: false is the default setting, so it changed nothing, but git.useIntegratedAskPass: false stopped the ssh passphrase prompt at least in the Agent Window! I saw one prompt in the IDE Window with a different UI and that’s it as for now.
About that one prompt you still see in the IDE window with a different UI, that’s expected. git.useIntegratedAskPass: false disables the in-window modal in Cursor and brings back the default system SSH auth flow, so the UI looks different, and the prompt can still show up sometimes during remote git operations.
If you want to remove that too, load your passphrase key into ssh-agent via macOS Keychain. Then you’ll be asked for the passphrase only once per login session:
Yeah, understood about the keychain. What I don’t understand is what these background git operations are. I don’t want any process I’m not familiar with to use my GitHub account, if that makes sense
Good question, there’s nothing hidden here. By background git operations, I mean normal read-only git commands that the built-in git integration and the Agent Window run to show up-to-date status like your current branch, remote state, linked PRs, and so on. This includes things like git fetch, ls-remote, and resolving branches and PRs. They can run, for example, when you switch between chats.
Important: these operations only read the state of your repo and its remote. They don’t push your code, don’t change anything on GitHub, and don’t do anything with your account beyond what git already does with your configured remote. The SSH key prompt shows up simply because contacting the remote over SSH requires a passphrase. It’s the same auth you’d see when running git fetch in a terminal.
If you don’t want these operations to run in the background at all, you can disable auto fetch with git.autofetch: false. Or if you want to fully disable the built-in git integration, set git.enabled: false. Just note that this will remove the SCM panel and branch status in the UI.