Hi there, I have a CLI 2.0 question: is there curr...
# ask-community
b
Hi there, I have a CLI 2.0 question: is there currently a way to login to the Cloud API in a fully-scripted environment?
1
This currently seems to require user input for the profile name, which is why I ask.
Copy code
❯ prefect cloud login --key $PREFECT_API_KEY --workspace $PREFECT_WORKSPACE
Creating a profile for this Prefect Cloud login. Please specify a profile name: default
Logged in to Prefect Cloud using profile 'default'.
Workspace is currently set to '$PREFECT_WORKSPACE'. The workspace can be changed using `prefect cloud workspace set`
m
Hey @Billy McMonagle this article might be helpful here, https://discourse.prefect.io/t/prefect-1-0-prefect-2-0-user-configurations-to-configuration-profiles/1299 Short version from my understanding you should be able to set the PREFECT_API_URL and PREFECT_API_KEY with this command
Copy code
prefect config set PREFECT_API_URL="URL"
if both those values are set you shouldn't need to authenticate directly, Provided the URL contains the Account ID for your account and the Workspace ID for the workspace you're pointing too. let me know if that helps 😄
b
Thanks Mason, this seems like what I'm looking for!
🙌 1