ChrisYounger / git_for_splunk

Simple versioning for your Splunk environment
https://splunkbase.splunk.com/app/4182
Apache License 2.0
36 stars 10 forks source link

Error - No such file or directory: 'git' #5

Open frosenbrock opened 4 years ago

frosenbrock commented 4 years ago

I am a Splunk beginner and have difficulties with git_for_splunk. Following the instructions, but the application cannot find the .git folder

GIT_WORK_TREE = / opt / splunk / etc / apps / dk_app_mb / GIT_DIR = / opt / splunk / etc / apps / dk_app_mb / .git / An exception of type FileNotFoundError occurred. Arguments: (2, "No such file or directory: 'git'")

I also tried: GIT_DIR = / opt / splunk / etc / apps / dk_app_mb / splunk container folder

image

ChrisYounger commented 4 years ago

Hi frosenbrock,

Sorry looks like my instructions are not clear enough. Based on your screenshot, your GIT_WORK_TREE should be etc/ and the GIT_DIR should be .git/

Let me know if this does not solve the problem Chris

frosenbrock commented 4 years ago

sorry, I put the wrong image

My application folder and git directory: splunk/etc/apps/dk_app_mb# appserver bin btool_output default .git .gitignore local lookups metadata static

And so is my configuration

image

and the log

GitForSplunk 1600977988 SPLUNK_HOME=/opt/splunk GIT_WORK_TREE=/opt/splunk/etc/apps/dk_app_mb/ GIT_DIR=/opt/splunk/etc/apps/dk_app_mb/.git/ An exception of type FileNotFoundError occurred. Arguments: (2, "No such file or directory: 'git'") runtime=0.0024430000000000285 status=2

ChrisYounger commented 4 years ago

ok it looks like Splunk cant find the git executable. Are you running this inside a docker container that doesn't have git installed?

frosenbrock commented 3 years ago

Yes, that is the problem 🤨😁 . With the installation of the package on windows, was successful. I haven't been able to install Git on the Docker Container yet. I will make updates on this topic about my procedure.