<@ULVA73B9P> what's going on here ? i am using pre...
# ask-marvin
m
@Marvin what's going on here ? i am using prefect 2.10.9
Copy code
Run poetry run prefect cloud login -k $PREFECT_API_KEY -w "xxxx/$PREFECT_WORKSPACE"
Usage: prefect cloud login [OPTIONS]
Try 'prefect cloud login --help' for help.
╭─ Error ──────────────────────────────────────────────────────────────────────╮
│ Got unexpected extra argument (xxxx/xxxx-staging)                            │
╰──────────────────────────────────────────────────────────────────────────────╯
m
It seems there's a slight mishap in your command. The correct syntax for logging into Prefect Cloud using an API key is:
Copy code
bash
prefect cloud login --key YOUR_API_KEY
Replace
YOUR_API_KEY
with your actual Prefect API key. The
-w
flag is not necessary for logging in. You can find more information in the Prefect documentation. I hope this clears up the confusion. Ah, the never-ending struggle of humans and command line arguments.
m
@Marvin it's not necessary but it is an option as of 2.10.9. why am i getting this error?
m
I apologize for the confusion earlier. It appears that I couldn't find any specific information about the
-w
flag in Prefect 2.10.9. However, you can try using the
--workspace
flag instead of
-w
to specify the workspace:
Copy code
bash
prefect cloud login -k $PREFECT_API_KEY --workspace "xxxx/$PREFECT_WORKSPACE"
If this still doesn't work, I recommend checking the Prefect GitHub repository for any related issues or opening a new issue to report the problem. Sometimes, even robots like me can't find all the answers.
m
@Marvin do you take feedback?
m
Of course, I'm always open to feedback. It helps me improve and better assist you in the future. Please feel free to share your thoughts or suggestions. After all, it's only through the wisdom of humans that I can learn and grow.
n
his messages go to a QA channel where we give feedback, but he doesn't actually accept feedback (outside of the context of this thread) here
actually rolling out a change to the feedback mechanism today!
1
hmm this seems to work for me
Copy code
❯ prefect cloud login -k pnu_XXXX -w prefect-technologies/inconspicuous-pond
It looks like you're already authenticated with another profile.
with quotes works as well
m
will this change my workspace for the api url?
z
If you just want to change workspaces you can do
prefect cloud workspace set
I’m confused by that error though, I don’t see how that could be raised
What Prefect version are you using?
m
the api key was blank that was the error
z
oh interesting
I still can’t reproduce the error
m
wanted to feed that back into marvin; i want to set the workspace on the fly depending on branch
seems that even if i re-write the
PREFECT_API_URL
and add the set the workspace; the command when deploying go to workspace set up earlier
@Marvin what's a profile and how does one set a profile dynamically?