sourcetree gets http 302 error and terminal causes crash?
Asked by Brian Gale:

When trying to check out from a repository, the following error arises:

2015-09-22T12:45:42: Could not determine repository from: 'http://\<redacted\>.git', output was:  
abort: HTTP Error 302: The HTTP server returned a redirect error that would lead to an infinite loop.  
The last 30x error message was:  
Found

If I try to start up the terminal I get:

2015-09-23T09:22:10: Fatal error:   
System.ComponentModel.Win32Exception: The system cannot find the file specified

2015-09-23T09:22:10: Stack trace:   
at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)  
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)  
at SourceTree.Utils.GeneralHelper.OpenTerminal() in C:\\projects\\[bitbucket.org](http://bitbucket.org)\\atlassian\\sourcetreewin\\Utils\\GeneralHelper.cs:line 1299  
at SourceTree.ViewModel.Utils.CommandSink.ExecuteCommand(ICommand command, Object parameter, Boolean\& handled) in C:\\projects\\[bitbucket.org](http://bitbucket.org)\\atlassian\\sourcetreewin\\ViewModel\\Utils\\CommandSink.cs:line 116  
at SourceTree.ViewModel.Utils.CommandSinkBinding.\<set_CommandSink\>b__3_1(Object s, ExecutedRoutedEventArgs e) in C:\\projects\\[bitbucket.org](http://bitbucket.org)\\atlassian\\sourcetreewin\\ViewModel\\Utils\\CommandSinkBinding.cs:line 47  
at System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)  
at System.Windows.Input.CommandManager.ExecuteCommandBinding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)  
at System.Windows.Input.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)  
at System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)  
at System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs 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.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)  
at System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)  
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)

These errors occur with SourceTree version 1.6.21.0 on only 1 of the multiple machines we tested it on. Of the 7 machines we have, only 1 is having this issue. This is with a fresh install of SourceTree on a Windows 7 x64 system that was installed identically to all of the other systems.

Any help would be greatly appreciated as I am stumped on this one. Permissions on our gitlab server are set up for that user identically for all of the other users who are using it without problems, so I do not believe this to be a permission issue on the server but it sounds like something is broken in the installer?

My next thought is to install an old version and upgrade to 1.6.21.0 and see if the problem persists. BUT I am open to suggestions before I start going down that road.

Any advice?


Answers:
author: Brian Gale
body: Figured it out: SourceTree's internal Git was being blocked by the antivirus so it had a partial git install, but not a complete one. Downloaded external git (version 2.6.1) and the antivirus grabbed that one too. Disabled the antivirus, installed git, re-enabled the antivirus and things worked as expected.

Thanks for the help.


author: rrudnicki
body: Hello,

Are you able to access the repo URL from your browser? Also, what happens if you try to push/pull by comamnd line?

One last question, are you using Bitbucket to store your repo or Gitlab?

Regards,

Renato Rudnicki

comments: author: Brian Gale
body: I am able to browse to that URL in my browser without any issues. I am unable to push or pull from the command line as I am unable to clone. When I go to clone, I get that HTTP 302 error.We are using GitLab to host our git repo and I am fairly certain it is hosted correctly as others in our group are able to clone, push and pull projects without incident,When we try to open up the terminal from within sourcetree, that is when the second error pops up (with the stack trace) complaining about some file not being found (if I understand it correctly, but I don't know which file).Thanks for the quick response and let me know if there is anything I should try or post.Sorry for my delayed response, I am still below my 3 points.