Hello in my AWS worker I am seeing an error: ``fat...
# ask-community
b
Hello in my AWS worker I am seeing an error: ``fatal: not a git repository (or any of the parent directories): .git` I have tried many things ( my gh PAT is correct, my repo is valid, the branch exists ). Can anyone help please?
hey @Nate- sorry to be a pest, but is there anythign you can do to help with this?
I even removed the { "prefect.deployments.steps.git_clone": { "repository": f"{git_metadata.repo}", "access_token": "{{ prefect.blocks.secret.github-pat }}", "branch": branch, } }, thinking that might be related - but I am still seeing the same error and it means my flow never gets out of a
Pending
state....
n
ah. what version of the client?
b
its just using:
Copy code
variable "worker_image" {
  description = "Docker image for the Prefect Worker"
  type        = string
  default     = "prefecthq/prefect:3-latest"
}
n
sorry, for the flow run pod/container
same thing?
b
3.6.4 ( so yeah )
n
well, can you try actual latest? 3.6.5 contains a fix related to templating that i don't think would be related? but would be good to rule out
Copy code
» docker run -p 4200:4200 --rm -t prefecthq/prefect:3-latest -- prefect version
Version:              3.6.5
b
yep - will do now. give me 5
no change - same issue. FYI this is happening on the worker ( not in the flow run )
the flow does stay in
Pending
state but I can see the ECS task exited with
[prefect] Exit code: 1.
n
can you see logs from the container at all? via ECS console etc or just the exit code
b
No logs. Just that. 😔
n
oh wait
Copy code
"repository": f"{git_metadata.repo}",
yea but you said you removed the pull step and still see the same thing? or just the same exit code without that git error?
the fact that's an f-string is kinda surprising to me but maybe red herring
b
yeah red herring its just done in a cli CI tool I have. it resolves in prefect deployment inspect ...
n
hm
i think im missing something important. if you're seeing the
fatal: not a git repository
it kinda has to be from the pull step imo if you're not seeing that anymore and its just the exit code, i frankly have no idea w the information presented here, but its usually about deps if it fails hard
b
the git error is still there ( in the worker ) nfi how .... but the flow is still not picking up.... so also nfi
n
is this the type of flow that could feasibly run if you started a docker worker locally and temporarily changed the pool to point at it? or duplicate the deployment? often i find there's less obscure layers to dig through when debugging some containerized flow run failing to start
b
yes - it could - its literally me trying to stand up ecs workers though. its a hello world flow ( just prints )
its more an infra thing I think
n
but i guess if you're getting some git error, i suspect the issue is not related specifically being on ECS. maybe its just the fact its a container somehow and having it run locally would make it easier to poke around 🤷 sorry not sure
b
5 December 2025, 09:49 An exception occurred. prefect 5 December 2025, 09:49 File "/opt/code/.venv/lib/python3.11/site-packages/prefect/cli/_utilities.py", line 44, in wrapper prefect 5 December 2025, 09:49 return fn(*args, **kwargs) prefect 5 December 2025, 09:49 ^^^^^^^^^^^^^^^^^^^ prefect 5 December 2025, 09:49 File "/opt/code/.venv/lib/python3.11/site-packages/prefect/cli/_types.py", line 159, in sync_fn prefect 5 December 2025, 09:49 return asyncio.run(async_fn(*args, **kwargs)) prefect 5 December 2025, 09:49 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ prefect 5 December 2025, 09:49 File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run prefect 5 December 2025, 09:49 return runner.run(main) prefect 5 December 2025, 09:49 ^^^^^^^^^^^^^^^^ prefect 5 December 2025, 09:49 File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run prefect 5 December 2025, 09:49 return self._loop.run_until_complete(task) prefect 5 December 2025, 09:49 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ prefect 5 December 2025, 09:49 File "/usr/local/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete prefect 5 December 2025, 09:49 return future.result() prefect 5 December 2025, 09:49 ^^^^^^^^^^^^^^^ prefect 5 December 2025, 09:49 File "/opt/code/.venv/lib/python3.11/site-packages/prefect/cli/flow_run.py", line 428, in execute prefect 5 December 2025, 09:49 await runner.execute_flow_run(id) prefect 5 December 2025, 09:49 File "/opt/code/.venv/lib/python3.11/site-packages/prefect/runner/runner.py", line 601, in execute_flow_run prefect 5 December 2025, 09:49 async with context: prefect 5 December 2025, 09:49 File "/opt/code/.venv/lib/python3.11/site-packages/prefect/runner/runner.py", line 1571, in aenter prefect 5 December 2025, 09:49 self._cancelling_observer = await self._exit_stack.enter_async_context( prefect 5 December 2025, 09:49 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ prefect 5 December 2025, 09:49 File "/usr/local/lib/python3.11/contextlib.py", line 650, in enter_async_context prefect 5 December 2025, 09:49 result = await _enter(cm) prefect 5 December 2025, 09:49 ^^^^^^^^^^^^^^^^ prefect 5 December 2025, 09:49 File "/opt/code/.venv/lib/python3.11/site-packages/prefect/runner/_observers.py", line 157, in aenter prefect 5 December 2025, 09:49 self._events_subscriber = await self._exit_stack.enter_async_context( prefect 5 December 2025, 09:49 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ prefect 5 December 2025, 09:49 File "/usr/local/lib/python3.11/contextlib.py", line 650, in enter_async_context prefect 5 December 2025, 09:49 result = await _enter(cm) prefect 5 December 2025, 09:49 ^^^^^^^^^^^^^^^^ prefect 5 December 2025, 09:49 File "/opt/code/.venv/lib/python3.11/site-packages/prefect/events/clients.py", line 555, in aenter prefect 5 December 2025, 09:49 await self._reconnect() prefect 5 December 2025, 09:49 File "/opt/code/.venv/lib/python3.11/site-packages/prefect/events/clients.py", line 566, in _reconnect prefect 5 December 2025, 09:49 self._websocket = await self._connect.__aenter__() prefect 5 December 2025, 09:49 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ prefect 5 December 2025, 09:49 File "/opt/code/.venv/lib/python3.11/site-packages/websockets/asyncio/client.py", line 587, in aenter prefect 5 December 2025, 09:49 return await self prefect 5 December 2025, 09:49 ^^^^^^^^^^ prefect 5 December 2025, 09:49 File "/opt/code/.venv/lib/python3.11/site-packages/websockets/asyncio/client.py", line 543, in __await_impl__ prefect 5 December 2025, 09:49 await self.connection.handshake( prefect 5 December 2025, 09:49 File "/opt/code/.venv/lib/python3.11/site-packages/websockets/asyncio/client.py", line 114, in handshake prefect 5 December 2025, 09:49 raise self.protocol.handshake_exc prefect 5 December 2025, 09:49 File "/opt/code/.venv/lib/python3.11/site-packages/websockets/client.py", line 325, in parse prefect 5 December 2025, 09:49 self.process_response(response) prefect 5 December 2025, 09:49 File "/opt/code/.venv/lib/python3.11/site-packages/websockets/client.py", line 142, in process_response prefect 5 December 2025, 09:49 raise InvalidStatus(response) prefect 5 December 2025, 09:49 websockets.exceptions.InvalidStatus: server rejected WebSocket connection: HTTP 403 prefect 5 December 2025, 09:49
Copy code
Traceback (most recent call last):
might be easier as a screen shot @Nate
n
oh interesting that looks like a websocket connection issue
... might be a security group thing?
b
It wsd actually the ephemeral prefect environment variable being set by the host when it shouldn't have? I had to override it to false and it worked. Mason from support ended up helping me out. Perhaps a bug somewhere because I didn't set it.
n
... weird! i'll see if i can reproduce that - thanks for following up!
👍 1