Hi! When using the Github storage block to connec...
# prefect-community
Hi! When using the Github storage block to connect to a private repo (using Prefect version 2.6.6), I get a password related error (details in the first reply) when running a flow, what am I doing wrong?
I've generated a PAT in Github and have given it access to the specific private repo and have given it Content permission (is that the right one?). I added the PAT together with the https://github.com/{User}/{Repo}.git url to the Github block and left the reference field blank.
Copy code
Flow could not be retrieved from deployment.
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/prefect/engine.py", line 255, in retrieve_flow_then_begin_flow_run
    flow = await load_flow_from_flow_run(flow_run, client=client)
  File "/usr/local/lib/python3.10/site-packages/prefect/client/utilities.py", line 47, in with_injected_client
    return await fn(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/prefect/deployments.py", line 159, in load_flow_from_flow_run
    await storage_block.get_directory(from_path=deployment.path, local_path=".")
  File "/usr/local/lib/python3.10/site-packages/prefect/filesystems.py", line 913, in get_directory
    raise OSError(f"Failed to pull from remote:\n {err_stream.read()}")
OSError: Failed to pull from remote:
 Cloning into '/tmp/tmp8vry78_qprefect'...
fatal: could not read Password for '<https://github_pat_>***@github.com': No such device or address
Apparently I was using Github Fine-Grained Access tokens (beta) instead of the classic tokens. When I used the classic token with repo scope, it did work.
👍 1