I'm currently having an issue with accessing git hash using the subprocess module from the python on Linux ArcGIS server.
I'm using ArcGIS 10.8 Linux server version and using the python interpreter on the server at the default location (/home/usr/server/tools/python)
My code snippet is
a = subprocess.Popen(['git rev-parse HEAD'], cwd=os.path.dirname('/home/usr/server/my_project'), stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
When I run this command, it returns
('', "Can't recognize 'git' as an internal or external command, or batch script.\r\n")
Has anybody had a similar issue before?
Thank you in advance