Enda Peng
12/30/2021, 1:46 AM~/.prefect/config.toml
deprecated? I tried with prefect agent local start -t <my-token>
which succeeds, however, after I save it under config.toml and restart without -t
, it complains about missing API key, this is my config.toml file
[xxx]# cat ~/.prefect/config.toml
[cloud]
api_key = "*******"
Kevin Kho
prefect auth login --key API_KEY
and this should take care of authenticating the agent when you do prefect agent local start
Kevin Kho
auth.toml
fileEnda Peng
12/30/2021, 2:14 AMZanie
Zanie
Zanie
Enda Peng
12/30/2021, 3:29 PM[2021-12-30 01:32:21,284] ERROR - agent | Failed to verify authentication.
Traceback (most recent call last):
File "/usr/local/python39/lib/python3.9/site-packages/prefect/agent/agent.py", line 890, in _setup_api_connection
self._verify_token(self.client.get_auth_token())
File "/usr/local/python39/lib/python3.9/site-packages/prefect/agent/agent.py", line 821, in _verify_token
raise AuthorizationError("No agent API token provided.")
prefect.utilities.exceptions.AuthorizationError: No agent API token provided.
Enda Peng
12/30/2021, 3:30 PMconfig.toml
. Then called login, which creates auth.toml
. It solves my problemZanie
Zanie
Tony Liberato
01/11/2022, 4:21 PMKevin Kho
Tony Liberato
01/11/2022, 4:32 PMKevin Kho
Tony Liberato
01/11/2022, 4:34 PMKevin Kho
Tony Liberato
01/11/2022, 4:51 PMTony Liberato
01/11/2022, 4:56 PMKevin Kho
Kevin Kho
flow.run()
, and then when ready to bring to Cloud, use flow.register()
and run from Cloud