My SourceTree don't want to show the log It says "Git log failed with code 128" with no messages
Asked by mrhands:

I don't know since I update my source tree to the latest version I can not see the log in my source tree again it says only

```
Git log failed with code 128 :
```

no more message added. How I can fix this. Although I update again through the latest version again it still says that message.

The picture you can see as below :

![](https://lh6.googleusercontent.com/-Pu14PZsuWPw/UeS1LJ2K8fI/AAAAAAAAACY/FPOialfM8RQ/w716-h510-no/snippet.jpg)


Answers:
author: Aziz Igam
body: Disconnect everything including remote branch, quiting sourcetree completely, then reconnect to your remote branch and sourcetree. It should work. I supposed it's cache issue of SourceTree. It resolved my issue here. If problem remains, try reboot pc.


author: cjolive
body: I've see this error code every now and then - for me the solution is to disable "Auto-Sandbox" in Comodo Internet Security (think there's a way to trust Sourcetree permanently but haven't got round to that yet). Might not be causing your problems but might help anyone else using Comodo.

comments: author: ulugbekrozimboyev
body: what is comodo?


author: nikolastojiljkovic
body: Yes! Disabling auto-sandbox in Comodo did it for me.  

However, I couldn't just stop here... this is bat country ... and I don't like disabling global security features :)  

Anyway, here is what I did to make it work:

- open Comodo's main panel;  
- switch to "Tasks" view (upper right corner of the main window);  
- go to "Sandbox tasks" tab and click on "Open Advanced Settings";  
- in the new window that just opened click on "Behavior Blocker" tab on the left;  
- check "Define exceptions for behavior blocking" and click on the "Exceptions";  
- add an exception for SYSTEM's Git here (git.exe). I did it by adding it from the list of running processes in Comodo, but you can add it as a file (or even add the whole "bin" folder of your system's git, if you want to);

And finally setup SourceTree to use system git.  
-------------  
To use SourceTree's Embedded Git, add an exception like described above for SourceTree's git.exe. It's located in C:\\Users\\your_user\\AppData\\Local\\Atlassian\\SourceTree\\git_local\\bin\\ folder.


author: Emmanuel POT
body: I got a very similar error on Windows after adding an environment variable GIT_DIR on Windows. If I rename this variable to GIT_PATH, everything works well.


author: Kyle Merritt
body: I am having this same issue. I was thrashing around trying to figure out using putty ssh and someone suggested clicking "Use System Git." Once I finally did get the ssh issue sorted out (I used OpenSSH cause I was already used to it) I had this issue. I tried switching back to Embedded Git and Updating the embedded git with no luck. I get the same error (git log failed with 123) even if I use Embedded Git. Updating embedded git fails. It gives me this message: Capture.PNG  
[](https://community.atlassian.com/t5/Sourcetree-questions/My-SourceTree-don-t-want-to-show-the-log-It-says-quot-Git-log/qaq-p/33376?attachment-id=2600){#link_116c5d963b6a60}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/1034/1/Capture.PNG){#display_116c5d963b6a60_0}

comments: author: Kyle Merritt
body: Nevermind. Seems that my issue was the Comodo one as well. I didn't even know that I had it the first time I read through this thread, because I'm on a new computer that was setup by IT. I'm pretty sure that the updating embedded git thing is an issue though.


author: Adam Smith
body: Hi Kieran,

Thanks for the quick response. The problem started while I was using external git, I have tried updating the embedded git and switching sourcetree to use this but is the same. The respositories are all okay and I can access and use them as normal via git bash. I have even removed source tree and reinstalled it from scratch but weirdly the issue is still occuring.  

All repos in Sourcetree have not details showing under remote branches, fetch with both tick boxes ticked does nothing i.e. will not start. Also the error seem to appear when I open an repo in Source tree. I am able to clone repos without error but again no remotes showing for them once they have been cloned. Have to say am stumped as what else I can try so I have had to revert to accessing and using repos via git bash.


author: Adam Smith
body: Hi, I have recently started having the exact same error that is reported in this thread. Does anyone know if there was ever a resolution found for this issue?

comments: author: KieranA
body: Hi Adam,

As discussed the problem revolved around the embedded Git being corrupted for some reason. To fix (if you're talking about Windows) there's a 'Update Embedded Git' button on the 'Git' tab of the SourceTree options.

Cheers


author: KieranA
body: Alternatively it could be something to do with your Git repository itself. Could you run a 'git log' at the terminal for that repository to see what output you get?


author: mrhands
body: Sory I didn't show up when I use embedded git. When I click **'Update Embedded Git'** It shows up download and finish download succesfully and then if I click again it says **"Are you want to (re)download the embbedded version of Git?"**

This is my configuration file. I don't know what do you mean with **2 copies** .. It's only one file in the **SourceTree.exe_\<hash\>..**

<https://gist.github.com/anonymous/6092588>


author: mrhands
body: I have try those methods all but none is success. I can described the error in this video for more detail.. Hope can find the problem

<http://www.youtube.com/embed/Q9y7BvMENrY>

I have installed the latest Git version and the latest SourceTree

comments: author: stevestreeting
body: Thanks. You didn't show what happened when you accepted the 'Update Embedded Git' prompt though, does that actually complete successfully, and then still shows 'Unknown'?

It would be useful if you could attach a copy of your user.config file, preferably 2 copies, one with it set to System Git and one to Embedded Git. This file is located in %USER%\\AppData\\Local\\Atlassian\\SourceTree\\SourceTree.exe_\<hash\> - with \<hash\> being a big string of characters which is derived from where you installed it.


author: mrhands
body: I don't know what the version I have it tells me unknown version of Git...

But I have system git of version 1.8.1.2-preview20130201 It's like this..

![](http://imageshack.us/a/img856/5919/juom.jpg)

comments: author: stevestreeting
body: It appears that you've been using the embedded git but that something has deleted it partially or similar - it's not completely missing (if it was, SourceTree would prompt you to download it again) but it's clearly not operational.

If you have a version of Git installed generally on your machine then you can click 'Use System Git' instead - it may find it automatically or otherwise you can browse to it.

Alternatively you can click 'Update Embedded Git' to re-download the embedded version of Git.


author: stevestreeting
body: We need more information about the state of your repository, it's not what Kieran thought it was. The fact that there's no message after the 128 error suggests that git did nothing at all and just returned a 128 error code immediately. Please can you open Tools \> Options \> Git and tell me what your Git Version section says.


author: KieranA
body: Hi Handita,

I've reported this for you on JIRA here: <https://jira.atlassian.com/browse/SRCTREEWIN-826>

I'm thinking it's similar to some other cases that we already handle. There are times when this error will occur but we mitigate for it. Windows perhaps doesn't handle these cases yet. One thing I can think of is your branch being orphaned, but you've got one branch and one commit by the looks of it.

You can watch the issue on JIRA to see updates, it'll be looked into early next week if that's OK.

Cheers


author: mrhands
body: This is a valid git repository when I log it through command It's look like this.

![](https://lh6.googleusercontent.com/ZFZ6HxsAPkCiYihxXrPocClYiu6nKb7Dz4d33j0qQ2o=w749-h347-no)

I have reinstalled program and still the same. What the problems?


author: KieranA
body: Hi Handita,

This error is usually generated by SourceTree as a result of trying to make a Git call against a folder which isn't Git-initialised. Is the folder you've opened with SourceTree a valid Git repository? You can test this by opening a command prompt and browsing to that directory and typing "git log" to see what it returns.

Hope that helps


Tags: error