11/07/2022, 11:34 AM
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{User}/{Repo}.git url to the Github block and left the reference field blank.
Flow could not be retrieved from deployment.
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/prefect/", 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/", line 47, in with_injected_client
    return await fn(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/prefect/", 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/", line 913, in get_directory
    raise OSError(f"Failed to pull from remote:\n {}")
OSError: Failed to pull from remote:
 Cloning into '/tmp/tmp8vry78_qprefect'...
fatal: could not read Password for '<https://github_pat_>***': 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