Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Sourcetree Terminal on Windows loads SSH key with every remote-related command

alondono
Contributor
April 3, 2018

The connection to my remote in Bitbucket uses the SSH protocol. Using Sourcetree to push, pull, and fetch works as expected and without issues.

The problem occurs when I start Git Bash using the Terminal button in Sourcetree. If I try to use any of the remote-related commands like `git push`, `git pull`, or `git fetch` then I get prompted for my key's passphrase. The annoying part is that this happens every time I use any of those commands, regardless of whether I am still in the same Git Bash session, or if the Git Bash window was closed and reopened, or if I used the command only a few seconds ago.

I would understand if the key is loaded — and I get asked for the passphrase — the first time I use a remote-related command for that session of Git Bash, but if I don't close the Git Bash window, being asked for the passphrase for every command is bothersome. Is it possible to keep the key loaded for that session of Git Bash?

PS: I've been able to associate Sourcetree's ssh-agent with a Git Bash session, and keeping the key loaded, but only if the Git Bash window wasn't started from the Terminal button in Sourcetree. I do this by manually (or with a script) setting the SSH_AUTH_SOCK and SSH_AGENT_PID variables accordingly. But for some reason, this doesn't work if I try to do it with the Git Bash session started with the Sourcetree Terminal button.

1 answer

0 votes
minnsey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 5, 2018

Hi

Thanks for the detail. 

That looks like a bug, I've raised https://jira.atlassian.com/browse/SRCTREEWIN-8516 to report it.

alondono
Contributor
April 5, 2018

Hi Michael,

Thank you for that. I will follow that issue.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events