gradle-git-version icon indicating copy to clipboard operation
gradle-git-version copied to clipboard

Issues in intelliJ with 0.7.0+

Open rahij opened this issue 8 years ago • 5 comments

Since we started using external git instead of jgit, I keep getting errors in intellij: "Cause: error invoking git command" from https://github.com/palantir/gradle-git-version/blob/0.7.3/src/main/groovy/com/palantir/gradle/gitversion/GitCli.groovy#L24. Is there something I need to do to make intellij run my system's git command?

rahij avatar Jun 28 '17 07:06 rahij

I personally never run Gradle out of IntelliJ, so haven't seen this and don't have a solution, sorry. Happy to take a fix though if you get to the bottom of this.

uschi2000 avatar Jun 28 '17 15:06 uschi2000

possible alternatives:

  1. use the built in terminal to run commands from intellij. it'll even setup your CWD to the project root
  2. use the External Tool "stuff" to run a command from inside intellij

jmcampanini avatar Jun 29 '17 13:06 jmcampanini

So I'm not trying to run git manually inside intellij. My git integration actually works. I get this error when I press the 'Sync' button and it crashes on version gitVersion() in my build.gradle

rahij avatar Jun 29 '17 13:06 rahij

hrmm, yea. i'm in the same boat as uschi2000 here, i haven't found a way to use intellij's built-in gradle support :(

jmcampanini avatar Jun 30 '17 13:06 jmcampanini

you just have to make sure you git config is setup correctly. Intellij it's here : image

This fixed it for me.

ghost avatar Jul 07 '17 17:07 ghost