Issue
I just updated SourceTree to the most recent Windows version, 1.8.1. I wish I knew what version I was on previously, but I believe it was an early 1.7.x version, as there were several options for me to choose what to upgrade up to.
Previously SourceTree would launch the ssh-agent to ask for my credentials on every launch of the application, which was fine. Now, after the upgrade, a modal pops up with the error:
'ssh-agent' failed with code - 1: System.NullReferenceException: Object reference not set to an instance of an object. ()
Opening and closing the Options menu will also prompt the error modal, as will Tools -> Launch ssh-agent. I checked the log (sourcetree.log) to see if I could find a message that would indicate that this is the same problem as this user had here, but instead, every time the application launches, there are either 22 or 44 entries of this identical message:
ERROR [2016-02-16 14:06:17,785] [1] [SourceTree.Bookmarks.BookmarkManager] [RegisterBookmarkEventHandlers] - RegisterAsRepositoryUpdatedEventHandler called with null repo
That message does not get logged every time the modal appears, only every time SourceTree is opened. I have gone through every repository I have bookmarked, and they all still do exist both locally and remotely. Under Tools -> Options I am set to be using OpenSSH as my SSH Client, my SSH key is set to the correct file path, and I am set to be using System Git.
Are there other log files, either SourceTree specific or from git or even OpenSSH, that I should look for that might give me more details on what's actually giving this NullReferenceException?
Solution
Updating my embedded git version fixed this issue for me as per the attached link.
I went from version 1.9.something to 2.6.1
Answered By - Michael O'Brien Answer Checked By - Dawn Plyler (WPSolving Volunteer)