Sourcetree Embedded Git

  • Status:Gathering Impact(View Workflow)
  • Resolution: Unresolved
  • Fix Version/s: None
  • Labels:

To streamline the downloads necessary when installing Sourcetree and get to work we removed Git LFS and git-flow AVH from the 'embedded dependencies' set. We did this because Git for Windows started including both of these directly starting with 2.12.1 and is currently on 2.17.0. When SourceTree tries to install embedded git, it runs into a timeout. That might be my company's firewall. So I manually typed the indicated address in my browser and it would download the file. However, the place where to put the embedded git directory it is unknown to me. Questions: what.

When attempting to update the embedded Git, Sourcetree crashes. Below is the log snippet:
ERROR [2016-02-23 08:15:28,697][1][SourceTree.AppRoot][HandleCrash] - Fatal error
System.UriFormatException: Invalid URI: The hostname could not be parsed.
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
at System.Net.WebProxy.ctor(String Host, Int32 Port)
at SourceTree.WebManager.ConfigureCustomProxy(WebClient webclient) in C:projectsbitbucket.orgatlassiansourcetreewin-prodWebManager.cs:line 176
at SourceTree.ViewModel.DownloadWindowViewModel.Download() in C:projectsbitbucket.orgatlassiansourcetreewin-prodViewModelDownloadWindowViewModel.cs:line 122
at SourceTree.Utils.GeneralHelper.DownloadFile(String url, String destLocation, IInteractionsManager interactionsManager, IWebManager webManager, IDispatcher dispatcher, IRepoProcessFactory repoProcessFactory, String extractLocation) in C:projectsbitbucket.orgatlassiansourcetreewin-prodUtilsGeneralHelper.cs:line 614
at SourceTree.Download.DefaultDownloadManager.DownloadFile(Uri url, String downloadDestination, String extractionDestination) in C:projectsbitbucket.orgatlassiansourcetreewin-prodDownloadDefaultDownloadManager.cs:line 71
at SourceTree.ViewModel.PreferencesWindowViewModel.DownloadEmbeddedGit() in C:projectsbitbucket.orgatlassiansourcetreewin-prodViewModelPreferencesWindowViewModel.cs:line 1174
at System.Windows.Controls.Button.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

Nathan Swartzentruber
SourcetreeSourcetree Embedded Git
0Vote for this issue
2Start watching this issue

The maintainers of the Git and Mercurial open source projects have identified a vulnerability in the Git and Mercurial clients for Macintosh and Windows operating systems that could allow critical files to be overwritten with unwanted files, including executables.

Sourcetree Embedded Git

SourceTree users should update their Git client with one of the published Git maintenance releases (, 1.9.5, 2.0.5, 2.1.4 and 2.2.1) or Mercurial client with the latest release.

UPDATESteelcase amia task.

SourceTree for Mac 2.0.4 and SourceTree for Windows 1.6.12 have both been released to address this security vulnerability.

Sourcetree Cannot Update Embedded Git

Sourcetree Embedded Git

The Mac version includes embedded versions of Git and Mercurial which address the security vulnerability. If you are using system Git or Mercurial please ensure you update your local copies, alternatively you can switch to using embedded versions which are the latest releases of both Git and Mercurial.

Sourcetree Git Download

EDIT (Mac): Because previously we only supported embedded version 2.2.2 this is a big leap forward for embedded Mercurial. As a result, having hgsubversion enabled will cause errors. To fix this go into your SourceTree preferences by either hitting ⌘, on the keyboard or via the “SourceTree” menu in your toolbar, then browsing to the Mercurial tab. At the bottom of this tab is the “Extensions” section. Ensure “hgsubversion” is unchecked and everything should work again as it should. We will be bringing back support for this extension in a future version of SourceTree.

Git Client Sourcetree

The Windows version now defaults to download an updated version of Git and Mercurial. To update your embedded version go to the Git and/or Mercurial tabs in Tools > Options and click on “Update Embedded Git” or “Update Embedded Mercurial” respectively.