I am attempting to import a project from github into intellij and am running into this stack trace:
Caused by:
java.io.IOException: Cannot run program "git": error=2, No such file or directory at common_c6b3s0xd8gl4x9r47zsnga1nq$_run_closure12.doCall(/Users/jrengh/Documents/teri/common.gradle:97)
I have seen this issue posted around the internet a lot and the common solution seems to be to make sure that the git executable is correctly listed in the "Path to git executable" field under Settings > Version control > Git. I have done so, tested the connection and have gotten a successful message.
The issue stems from this task method called in a separate gradle file located within one of my project's dependencies:
common.gradle
task buildInfo {
def cmd = "git rev-parse --short HEAD"
def proc = cmd.execute()
project.ext.revision = proc.text.trim()
cmd = "git show -s --format=%ct HEAD"
proc = cmd.execute()
project.ext.timestamp = proc.text.trim()
}
So essentially, intellij doesn't recognize the "git" in the command I try to execute above even though I have successfully uploaded a git executable. Does anyone have any helpful suggestions?
gitinto the user/system PATH?