Hi all, we are running Prefect (2.8.7) with a gith...
# ask-community
z
Hi all, we are running Prefect (2.8.7) with a github storage block, and I am running into the error
FileNotFoundError: [Errno 2] No such file or directory: 'git'
. It was working fine, until we re-deployed a fresh EC2, and now it's not working. Is there any kind of configuration I'm missing, other than having a git-hub block & having
prefect-github
installed on the EC2? Any help is so appreciated! (Full stack trace in thread)
Copy code
Downloading flow code from storage at ''
09:48:40 AM
prefect.flow_runs
Flow could not be retrieved from deployment.
Traceback (most recent call last):
  File "/home/airbyte/.local/lib/python3.8/site-packages/prefect/engine.py", line 277, in retrieve_flow_then_begin_flow_run
    flow = await load_flow_from_flow_run(flow_run, client=client)
  File "/home/airbyte/.local/lib/python3.8/site-packages/prefect/client/utilities.py", line 40, in with_injected_client
    return await fn(*args, **kwargs)
  File "/home/airbyte/.local/lib/python3.8/site-packages/prefect/deployments.py", line 194, in load_flow_from_flow_run
    await storage_block.get_directory(from_path=deployment.path, local_path=".")
  File "/home/airbyte/.local/lib/python3.8/site-packages/prefect_github/repository.py", line 146, in get_directory
    process = await run_process(cmd, stream_output=(out_stream, err_stream))
  File "/home/airbyte/.local/lib/python3.8/site-packages/prefect/utilities/processutils.py", line 258, in run_process
    async with open_process(
  File "/usr/lib64/python3.8/contextlib.py", line 171, in __aenter__
    return await self.gen.__anext__()
  File "/home/airbyte/.local/lib/python3.8/site-packages/prefect/utilities/processutils.py", line 202, in open_process
    process = await anyio.open_process(command, **kwargs)
  File "/home/airbyte/.local/lib/python3.8/site-packages/anyio/_core/_subprocesses.py", line 127, in open_process
    return await get_asynclib().open_process(
  File "/home/airbyte/.local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 1105, in open_process
    process = await asyncio.create_subprocess_exec(
  File "/usr/lib64/python3.8/asyncio/subprocess.py", line 236, in create_subprocess_exec
    transport, protocol = await loop.subprocess_exec(
  File "/usr/lib64/python3.8/asyncio/base_events.py", line 1630, in subprocess_exec
    transport = await self._make_subprocess_transport(
  File "/usr/lib64/python3.8/asyncio/unix_events.py", line 197, in _make_subprocess_transport
    transp = _UnixSubprocessTransport(self, protocol, args, shell,
  File "/usr/lib64/python3.8/asyncio/base_subprocess.py", line 36, in __init__
    self._start(args=args, shell=shell, stdin=stdin, stdout=stdout,
  File "/usr/lib64/python3.8/asyncio/unix_events.py", line 789, in _start
    self._proc = subprocess.Popen(
  File "/usr/lib64/python3.8/subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib64/python3.8/subprocess.py", line 1704, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'git'
f
according to the traceback prefect invoke git which is not installed on your fresh VM
apt update && apt install git
for debian based distro as example
z
Ahh I knew we were missing something - thank you so much, I will try this