Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

How to set PATH for git invocation from Sourcetree?

Edited

Does anybody know how to set the PATH environment variable that Sourcetree on macOS uses when invoking git?

Background: For years I have been using a tool called git-remote-dropbox to store git repos for personal projects within my Dropbox account.  These repos are accessed using a dropbox:// URI and git automatically calls the git-remote-dropbox Python script when encountering a remote with such a URI.  It works beautifully...but only if git can find the git-remote-dropbox script.

In the past, opening Sourcetree from the command line with the stree command would cause it to inherit the PATH from the shell, and it would then be able to find the script.

An OS update forced some reworking of the Python installation and I had to reinstall the script to a different path.  I updated PATH in my shell configuration, and the system git can find the script in the new location when invoked from the shell.  But Sourcetree does not seem to be inheriting the new PATH, and git invocations from within Sourcetree can't find the script in the new location.  This is true for both embedded git and system git.

Sourcetree must be getting its PATH from somewhere, but I can't figure out where, or how to set it.  Anybody know?

Workaround:  Further experimentation revealed that /usr/local/bin is on the path seen by git when invoked from Sourcetree, so I got things running by adding a symlink to git-remote-dropbox in /usr/local/bin.  But I'd still like to know if there's a way to configure Sourcetree's PATH variable for git invocation.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events