It seems there might be an issue with secrets not being found on your virtual machine (VM) after logging in with an API key, even though it works locally. Here are some steps you can take to resolve this problem:
1.
Check Environment Variables: Ensure that the necessary environment variables are correctly set on the VM to work with Prefect. Secrets in Prefect can often be managed via environment variables. See the
settings guide for more details on configuring the environment.
2.
Manage API Keys: Verify that the API key used to log in on the VM is correct and has not expired. Here is a resource on
managing Prefect Cloud API keys.
3.
Secrets Manager Configuration: If you are using a secrets manager like AWS Secrets Manager or another cloud provider's secrets service, make sure your secrets manager block is correctly set up and that your code is correctly accessing it. For example, see the
AWS examples catalog for using the secrets manager with Prefect.
Additionally, no relevant open issues were found in the Prefect GitHub repository about secrets not being found on a VM.
If these suggestions do not resolve your issue, it may help to review the configuration of Prefect on your VM compared to your local setup to identify any discrepancies or to look for any VM-specific restrictions that might be causing the problem.