I have a python script which looks something like this.
from subprocess import Popen, PIPE
process = Popen(['git log'], stdout=PIPE,stderr=PIPE)
stdout, stderr = process.communicate()
I am getting "Permission denied" when running this script.
I have a python script which looks something like this.
from subprocess import Popen, PIPE
process = Popen(['git log'], stdout=PIPE,stderr=PIPE)
stdout, stderr = process.communicate()
I am getting "Permission denied" when running this script.
There is no command whose name is git log; you want the command git with the argument log.
Tangentially, if you are on Python 3.5 or higher, you want to upgrade to subprocess.run().
from subprocess import run, PIPE
result = run(['git', 'log'], stdout=PIPE, stderr=PIPE, text=True, check=True)
stdout = result.stdout
stderr = result.stderr