The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

ssh-agent error every time I close settings page.

David
July 24, 2023

Every time I close the Settings page, I get the following error:

'ssh-agent' failed with code -1:
System.NullReferenceException: Object reference not set to an instance of an object. 0

git-error.png

Pretty sure that's because I use the native built-in windows SSH Agent.

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Martin Runge
Community Champion
August 6, 2026

Hi @David

You are right that it comes from the SSH agent handling. This is a known Sourcetree for Windows bug. With Tools > Options > General > SSH Client set to OpenSSH, Sourcetree still tries to spawn and query its own ssh-agent on top of the native Windows OpenSSH Authentication Agent, and it throws that null reference when it cannot get a valid handle back. It is tracked as SRCTREEWIN-8375.

The reassuring part is that it is usually cosmetic. Your clone, fetch, and push through the Windows agent keep working; the message just fires every time you close settings or start the app.

If you do not specifically need OpenSSH, I would switch the SSH Client to PuTTY / Plink. That path does not trigger the error and has been the recommended client on Windows for a long time.

Cheers, Martin

TAGS
AUG Leaders

Atlassian Community Events