Error: Gitflow is not installed #7

Closed
Leenug opened this Issue Sep 30, 2013 · 43 comments

Projects

None yet
@Leenug
Leenug commented Sep 30, 2013

When trying to start a new hotfix, feature or release the following error is returned in the event log:

13:18:29 Error: Gitflow is not installed
13:18:29 Error

Gitflow is installed and works as expected from both my external terminal and PHP Storms built in terminal.

@OpherV
Owner
OpherV commented Sep 30, 2013

Can you please paste the content of your project's .git/config file?

@Leenug
Leenug commented Sep 30, 2013
[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
    ignorecase = true
    precomposeunicode = false
[remote "beanstalk"]
    url = ****
    fetch = +refs/heads/*:refs/remotes/beanstalk/*
[branch "master"]
    remote = beanstalk
    merge = refs/heads/master
[branch "develop"]
    remote = beanstalk
    merge = refs/heads/develop
[gitflow "branch"]
    master = master
    develop = develop
[gitflow "prefix"]
    feature = feature/
    release = release/
    hotfix = hotfix/
    support = support/
    versiontag = v
@OpherV
Owner
OpherV commented Sep 30, 2013

Can you go to version control\console and paste what it says when you get the error?

image

@Leenug
Leenug commented Sep 30, 2013

nugdk

@Leenug
Leenug commented Sep 30, 2013

Just as a note, the terminal picks up the git flow command as expected.
w2quk

@OpherV
Owner
OpherV commented Sep 30, 2013

Hmm... very strange!

This sounds like some sort of $PATH issue. Maybe your PHPStorm points to one instance of git in the settings and the $PATH variable points to another in the terminals?

@Leenug
Leenug commented Sep 30, 2013

yeah I thought that may be the issue, running which git in terminal returns usr/bin/git and inside phpStorm's git settings I've set the executable to match. Very strange!

@OpherV
Owner
OpherV commented Sep 30, 2013

Which OS\PHPStorm versions are you running?

I'll try to replicate your environment over the weekend and see if I can reproduce the problem

@Leenug
Leenug commented Sep 30, 2013

Sure,
OSX: 10.8.4
PHPStorm: 131.205 (EAP)
Git: 1.7.12.4
Git-flow: 0.4.2-pre

Thanks for taking a look at this! It's not a deal breaker as ALT-TAB into terminal isn't too much of a pain ;)

@OpherV
Owner
OpherV commented Sep 30, 2013

Well the idea behind this plugin is that you don't have to go into terminal, so alt-tabbing kind of defies the point :)

In the meantime perhaps can you try and reinstall gitflow? Maybe that'll help

(Don't worry I won't ask you to turn it off and on again :P )

@sheaphillips

I've got the same issue with WebStorm 7 on Mac OS X 10.8.5....git flow works fine from the command line (and SourceTree FWIW), but WebStorm/gitflow plugin isn't finding it and reports:

12:02:57 PM Error: Gitflow is not installed
12:02:57 PM Error
@OpherV
Owner
OpherV commented Oct 4, 2013

Looks like it's Mac OS specific then. I'll don't own a Mac, but I'll try to get a hold of one to debug this.

@joetjen
joetjen commented Oct 8, 2013

Unfortunately I am having the same issue ;) I quickly took a look at the source and if I am correct you wrap the origin git4idea command to become "git flow" instead of "git". If that is the case this might cause the issue as Mac OS' underlying linux implementation is very strict and "simple" (i.e. the default ls doesn't even support long options) and thus might try to run the program "git flow" instead of running "git" with the first parameter beeing "flow". One solutions could be to enable the use of the "git-flow" command which afaik always comes with a git flow installation as well or trying to append the "flow" parameter before any other parameter get added to the git4idea command.

But then I only took a very short glance at the source and didn't dig into git4idea that much, so I could be completly wrong as well.

@OpherV
Owner
OpherV commented Oct 8, 2013

@joetjen Thank you for that insight! I'm not a Mac guy and that is super helpful to me. It sounds like a very probable culprit. I'll have a go at tackling this next week. Can you volunteer to test once I have something up? :) If so let me know at opherv@gmail.com
Much appreciated

@maltitco

For Mac from the terminal in a project run "git flow init" and then restart pycharm and everything will work.

@joetjen
joetjen commented Nov 7, 2013

Funny thing, I just forked gitflow4idea, set up the project and ran it in a test environment (with only git4idea and gitflow4idea plugins enabled) and it worked just perfect, even on EAP 13. I am trying to find out if it's some other plugin that might cause the problems.

@renekoch
renekoch commented Nov 7, 2013

any head way on this?

@joetjen
joetjen commented Nov 13, 2013

I am currently trying to rewrite some parts to use the git-flow executable directly instead of calling git with the flow subcommand. Unfortunately though I don't have too much time to invest on it at the moment.

@OpherV
Owner
OpherV commented Nov 13, 2013

Thing is on Windows there is no git-flow executable, and I have no Mac to test this on. I'm afraid I'll need the help of someone with a Mac to debug this

@joetjen
joetjen commented Nov 13, 2013

I have no Windows to check if there is not git-flow command, so I just assumed. On the Mac I forked the repository and for some reason I wasn't able to put my finger on, yet, the plugin works without errors when I run it in the Sandbox Environment, but no matter what I won't run in the real environment. I modified to code to see what git (I for example have two git versions installed) IntelliJ is using (just to be sure), but it is the correct one. I begin to believe it has something to do with the environment which isn't initialized properly (concerning Git) so the flow subcommand isn't initialized properly and thus won't be available.

I will continue to play with it once I have the time. Maybe - hopefully - I can come up with a solution.

@syoumans
syoumans commented Dec 5, 2013

OpherV, I'm seeing this on MacOS 10.9 with git 1.8.3.4 and git flow 0.4.1. I could provide remote debugging support. And by this, I mean that when I try to run a git flow command in phpStorm I get the following message:

13:09:12.015: git flow feature start FirstTest
git: 'flow' is not a git command. See 'git --help'.
Did you mean one of these?
    reflog
    show
@adkirk25

I'm getting the same error in intellij 13 on Mac OS X 10.7.5 using git 1.7.9.6 and git flow 0.4.2-pre

15:49:26.496: git flow feature start scv-1068
git: 'flow' is not a git command. See 'git --help'.
Did you mean one of these?
reflog
show

@hrmoller

Joining the thread with the same error.
Intellij 13 on Mac OS.X 10.9.1 using git ver. 1.8.2 and git flow ver. 0.4.2-pre

16:08:38.014: git flow feature start test
git: 'flow' is not a git command. See 'git --help'.
Did you mean one of these?
reflog
show

@yuppi0412

I'm getting the same error.
But I was able to resolve this problem.

Mac OSX: 10.7.5
PHPStorm: 7.0
Git: 1.7.7.5 (/usr/bin/git)
Git-flow: 0.4.1_0 (/opt/local/bin/git-flow)

Error seems to occur and not in the same directory hierarchy path of git-flow path and probably git.
It worked fine if you change the path of git.

ln -s /usr/bin/git /opt/local/bin/git

Best regards

@hrmoller

That didn't exactly do it for me.

My git has the same path as the above but my git-flow is placed at /opt/local/bin/git-flow and making symlinks to all the git-flow files from /usr/bin/ (/usr/bin/git-flow -> /usr/bin/local/git-flow) did it.

@syoumans

@yuppi0412 and @hrmoller thanks for your insight! It seems that git and git-flow files need to live together for the extension to work. I sym-linked my git-flow files into /usr/bin. Thanks for being tenacious and curious on this issue!

@OpherV
Owner
OpherV commented Feb 2, 2014

Awesome work guys! :)

@Leenug, @sheaphillips, @renekoch, @adkirk25
Can you try the proposed solution and confirm that it works?

I'll be sure to add this to the wiki\readme page :)

@gfeil
gfeil commented Feb 5, 2014

I experienced the same problem on OSX. I was using the system git and the homebrew installation of git-flow. Installing git from homebrew solved the problem easily without having to hack with the OSX directories.

@subnauez

I solved this problem by changing the "Path to Git executable" to /usr/local/bin/git instead of /usr/bin/git in PHP Storm GIT preferences.

@cnoble
cnoble commented Mar 6, 2014

I can confirm the resolution by subnauez does work of changing the path to git to /usr/local/bin/git

@adonix
adonix commented Apr 1, 2014

Just posting this solution in case anyone comes across with the same problem as I did in Max OSX 10.9.2. My solutions was this:

I executed this command:

$ which git
/usr/bin/git

$ which git-flow
/usr/local/bin/git-flow

I left my PhpStorm's path to git executable as it was (e.g. /usr/bin/git), and made a symbolic link to git-flow to point to /usr/bin/ since my git executable lives in /usr/bin/:

$ sudo ln -s /usr/local/bin/git-flow /usr/bin/git-flow

Adding symbolic links for git executable to /usr/local/bin/ didn't work. I also try to adding symbolic links to /opt/local/bin/ and that didn't work also. Hopefully this will help someone.

@adonix
adonix commented Apr 1, 2014

@OpherV Maybe this should be added to the ReadMe file for those Mac users who will be installing the plug-in?

@OpherV
Owner
OpherV commented Apr 4, 2014

@adonix 👍 I'll definitely do that

@OpherV OpherV closed this Apr 11, 2014
@plugn
plugn commented Oct 1, 2014

I had the same issue on Mac OS X 10.9.5.

Changing Git's path in IDE Preferences didn't help because there's no git executable in /usr/local/bin. I tried approach by @adonix and it was helpful, but I still had errors in IDE's Control Version console:

git flow feature start MAPS-412
/usr/bin/git-flow: line 73: /usr/bin/gitflow-common: No such file or directory

Therefore, the solution:

sudo ln -s /usr/local/bin/git-flow /usr/bin/git-flow

sudo ln -s /usr/local/bin/gitflow-common /usr/bin/gitflow-common
sudo ln -s /usr/local/bin/git-flow-init /usr/bin/git-flow-init
sudo ln -s /usr/local/bin/git-flow-version /usr/bin/git-flow-version
sudo ln -s /usr/local/bin/git-flow-feature /usr/bin/git-flow-feature
sudo ln -s /usr/local/bin/git-flow-release /usr/bin/git-flow-release 
sudo ln -s /usr/local/bin/git-flow-hotfix /usr/bin/git-flow-hotfix
sudo ln -s /usr/local/bin/git-flow-support /usr/bin/git-flow-support
sudo ln -s /usr/local/bin/gitflow-shFlags /usr/bin/gitflow-shFlags

Hope it helps someone.

@tonioriol

@plugn it worked for me. Many many thanks.

This was referenced Jan 12, 2015
@edgar-humberto

@plugn it works !

@sbrowett
sbrowett commented Feb 4, 2015

@plugn - worked for me too on Windows 7 with Cygwin

@szarouski

Following article helped me to get it working on Windows server with msysgit https://github.com/nvie/gitflow/wiki/Windows

@tonioriol

The @plugn solution stopped to work on El Capitan. El Capitan now protects certain system directories in "rootless" mode (a.k.a. System Integrity Protection). If you run these commands you'll see that the directories and files under there are now marked as "restricted. You can disable rootless mode like this:

  1. Reboot into recovery mode (reboot and hold down Cmd-R)
  2. Open a terminal
  3. Use this command: csrutil disable
  4. Reboot and run the command that worked prior to El Capitan

When you're done, it is highly recommended that you re-enable SIP by following the same steps, but using csrutil enable in step 3.

@serkandemirel0420

brew install git-flow
Also works.

@YixiuJiang

Anther update from Mac El capitan. Please refer here http://stackoverflow.com/questions/32659348/operation-not-permitted-when-on-root-el-capitan-rootless-disabled if you got "operation not permit" issue when try running "sudo ln -s /usr/local/bin/git-flow /usr/bin/git-flow".

@leomperes
leomperes commented Jun 21, 2016 edited

+1 to @serdem420

@ginko
ginko commented Oct 26, 2016

Has anyone made this work without changing the root permissions on El Capitan? I reset the symlink to my git and I'm still getting -> "git: 'flow' is not a git command. See 'git --help'.
Did you mean one of these? reflog show"

Both my git and git-flow are in the usr/local/bin directory. Any help is appreciated. Thanks!
➜ ~ which git
/usr/local/bin/git
➜ ~ which git-flow
/usr/local/bin/git-flow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment