Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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 Apr 05, 2018

Hi

Thanks for the detail. 

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

Hi Michael,

Thank you for that. I will follow that issue.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

5,719 views 4 12
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you