Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keybase Git: Sourcetree Fails to Find Remote Helper #3084

Open
Zuline opened this issue Oct 11, 2017 · 9 comments
Open

Keybase Git: Sourcetree Fails to Find Remote Helper #3084

Zuline opened this issue Oct 11, 2017 · 9 comments

Comments

@Zuline
Copy link

Zuline commented Oct 11, 2017

I set up a couple of trial repos. I love the way it works from the CL. However some of our team use Sourcetree as their GIT GUI of choice.

All goes well until you try to push to the remote and you get:

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags origin refs/heads/master:refs/heads/master
fatal: Unable to find remote helper for 'keybase'
Completed with errors, see above

Sourcetree Mac 2.3.2 (75)

@strib
Copy link

strib commented Oct 11, 2017

Hi @Zuline, due to limitations in SourceTree, remote helpers only work if you use "system git": https://confluence.atlassian.com/sourcetreekb/using-embedded-git-or-system-git-in-sourcetree-785323587.html

Does that fix it?

@maxtaco
Copy link
Contributor

maxtaco commented Oct 11, 2017

@strib I found other workarounds too. You can symlink our git-remote-helper into the embedded git dir. Or change the $PATH that launchd sets to include /usr/local/bin.

@maxtaco
Copy link
Contributor

maxtaco commented Oct 11, 2017

/Applications/Sourcetree.app/Contents/Resources/git_local/bin/ is where their embedded git is kept....

@maxtaco
Copy link
Contributor

maxtaco commented Oct 11, 2017

@chrisnojima did we come up with other solutions?

@chrisnojima
Copy link

The other thought was to ensure that /usr/local/bin was picked up by sourcetree itself. We were going to reach out to them to see if they'd do that themselves, you could theoretically just make a shortcut or script or something that just does this itself like a terminal alias (I haven't tested this)

PATH=$PATH:/usr/local/bin /Applications/SourceTree.app/Contents/MacOS/SourceTree

@Zuline
Copy link
Author

Zuline commented Oct 11, 2017

@strib thanks for the rapid response...it doesn't fix it. Sourcetree was using local git. I reset it and restarted...still the same issue.

@chrisnojima executing your code in the terminal invokes Sourcetree in CLI mode and, when asked, it pushes successfully. Interestingly it doesn't have an awareness that it's one behind the remote when invoked in that mode. Who knows why...

@maxtaco Thanks Max, it would be nice to have a clean solution to this for non-tech users.

@sphardy
Copy link

sphardy commented Nov 7, 2017

Hello - I just came looking for the solution to this exact problem.

While I had previously configured ST to use system git, the push to my keybase repo failed similarly to that described in the 1st post. I found if I carefully selected /usr/local/bin/git in ST preferences then ST does use it and I have full access to my keybase repo. By 'carefully' I mean I took a couple of attempts to set this. For some reason my first attempts failed.

FYI: SourceTree reports version 2.6.3 and 2.14.1 for System Git

Update: I believe I figured the problem.

On my system /usr/local/bin/git is a symlink to /usr/local/git/bin/git. When I selected /usr/local/bin/git via the file select dialog I did so by doubling clicked on the symlink. This appears to have caused ST to actually point to the linked file (ie /usr/local/git/bin/git), not the link itself. (Hope that is clear!). This is noticeable via a rapid update to the dialog before it then disappears.

If I instead selected /usr/local/bin/git in the dialog with a single click and then pressed the dialog Open button to accept the change, this caused ST to directly use /usr/local/bin/git. The path difference means the keybase helper can now be found in the same directory as the called git symlink.

@randarnold
Copy link

My fix… (for Max OS 10.13.3 and SourceTree 2.7.1)
PATH was correct, but /usr/local/bin /git-remote-keybase was not getting picked up
add a link for git: ln -s /usr/bin/git /usr/local/bin/git
change SourceTree to system git and select /usr/local/bin/git

Voila, everybody in the same directory and happy as a clam

maybe keybase can add this link when setting up git?

@retifrav
Copy link

Had the same problem on Mac OS (10.13.4) with Sourcetree (2.7, 152) and Tower (2.6.4, 357). Thanks to @sphardy and @randarnold, I found what was wrong:

  1. I did not have symlinks for utils from /Applications/Keybase.app/Contents/SharedSupport/bin/ in /usr/local/bin/, so I created those;
  2. I did not have symlink for /usr/bin/git in /usr/local/bin/, so I created it;
  3. Both Sourcetree and Tower were using their "embedded" Git. Changing it to /usr/local/bin/git (not /usr/bin/git!) solved the problem for me.

I guess, placing Keybase utils symlinks into /usr/bin/ would fix the problem as well, and then there will be no need in creating a /usr/local/bin/git symlink.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants