Scoop-extras: Sourcetree doesn't work with git installed via scoop

Created on 29 Jan 2019  路  13Comments  路  Source: lukesampson/scoop-extras

I installed git and sourcetree via scoop. Unfortunately now Sourcetree throws errors every time it wants to use git in the background:

image
(git works fine on the command line)

The reason might be this:

image

As far as I understand it, the scoop git actually lives at C:\Users\Jan\scoop\apps\git\current\cmd\git.exe. Is this correct?

Is this the reason for the errors I am getting?
Did I do something wrong or misunderstand something?
How can I fix it?

All 13 comments

Further googling led me to https://jira.atlassian.com/browse/SRCTREEWIN-7964 and then to https://github.com/lukesampson/scoop/issues/2167 which seems to be about this exact issue with Sourcetree :/ Will try the workaround mentioned there.

Ok, some background on what might be going on here:

Sourcetree expects to use the cmd/git.exe version of git.exe.
When Sourcetree starts it tries to find a system install of git by looking for a git.exe in

  • the PATH
  • known install folders in c:program files*

If it can't find a system git install it will, depending on situation, download and install an embedded copy or prompt the user to manually find the git.exe.

Because the user might find bin/git.exe or one of the others, when Sourcetree is presented with a git.exe it will attempt to walk the local folder structure to find cmd/git.exe

If it does it checks the git version and if all is good it will configure itself to use and remember that Git install.

Source: https://community.atlassian.com/t5/Sourcetree-questions/How-to-properly-direct-SourceTree-to-use-Git-in-the-Git-for/qaq-p/646389

I didn't get a prompt, so it seems to somehow have chosen this wrong path for git.exe.


This results in C:\Users\Jan\AppData\Local\Atlassian\sourcetree.exe_Url_p1q0f5drklhjmexhsmxbhot2hb2gom3k\3.0.17.2659\user.config having this bit:

            <setting name="GitSystemPath" serializeAs="String">
                <value>C:\Users\Jan\scoop</value>
            </setting>

Add cmd/git.exe from the quoted response above, and you get the path it shows that doesn't work.

Editing the value to C:\Users\Jan\scoop\apps\git\current while Sourcetree was closed seems to work as a workaround. No idea if this will work after an update.

Per https://community.atlassian.com/t5/Sourcetree-questions/How-to-properly-direct-SourceTree-to-use-Git-in-the-Git-for/qaq-p/646389 another workaround would have been to switch to the embedded git of Sourcetree (which would have been downloaded), then switch back to the system git which could/should have opened a prompt to set the git.exe path. As I didn't want to download the embedded git and maybe make Sourcetree use that, I didn't try that though.

Don't duplicate discussions.

Close this and go discuss to lukesampson/scoop#2167

That issue is in the wrong repository, Sourcetree is listed in the scoop-extras bucket, not the main one.

That's irrelevant. That issue was already created before this one and there are already involved other people. And you only duplicated eveything already said in there.

That's irrelevant. That issue was already created before this one and there are already involved other people.

That is surprising. Is that common around here? Then please some maintainer should close my issue with the confirmation that issues in wrong repositories are preferred here.

And you only duplicated eveything already said in there.

I actually offered an alternative solution/workaround to what was concluded in https://github.com/lukesampson/scoop/issues/2167

I see you are very active here in the scoop repositories, and appreciate the work you are doing and agree with a lot of the things you posted here (e.g. https://github.com/lukesampson/scoop/issues/2609) - but I think I am not wrong here.

You offered solution here, but only for you (now). Not for that people, who already go through that issue. They don't get notification or anything.

That is true. Normally I would post a link to this issue and the specific comment(s) over there (and explain that Sourcetree "lives" in this repo/bucket, so the discussion can continue here), but after our discussion here I am not sure if this is wanted here? You are around longer, please advise.

I properly reported the issue to Atlassian: https://jira.atlassian.com/browse/SRCTREEWIN-11329
I also commented on the issue in the scoop repo so the people in there get notified: https://github.com/lukesampson/scoop/issues/2167#issuecomment-458973887

@rasa That issue is in the wrong repository. It doesn't make sense to talk about Sourcetree in a repo that does not contain a manifest for Sourcetree.

That is true. I am working on being able to move it over. Until then, please use #2167. Sorry for the confusion.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nitrocode picture nitrocode  路  7Comments

ksawerykarwacki picture ksawerykarwacki  路  8Comments

Bazalia picture Bazalia  路  13Comments

lx4r picture lx4r  路  8Comments

graphixillusion picture graphixillusion  路  6Comments