Skip to main content
Stack Overflow
  1. About
  2. For Teams

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Prefect inside Github Codespaces: Can't Authorize Login

I'm trying to follow the Prefect Quickstart guide. I'm using a GitHub codespace. I was able to clone and run 01_getting_started.py without trouble. however when I run step 3

uvx prefect-cloud deploy 01_getting_started.py:main \ 
--name my_first_deployment \ 
--from https://github.com/PrefectHQ/quickstart

when I follow that it opens a webpage that says

 "To continue, please run the following in your terminal:" 

but in the terminal it doesn't have an option to enter the key. So the codespace hangs indefinitely.

I've also tried going line by line, using the login and the key. which says

prefect cloud login --key <<my_key>>
It looks like you're already authenticated on this profile.
? Would you like to reauthenticate? [y/N]: N
Authenticated with Prefect Cloud! Using workspace 'username/default'.

If I choose no, it says everything is fine. which it is, until I run

prefect-cloud deploy 01_getting_started.py:main 

where it then inevitably asks to open the authorization window and the cycle repeats.

I think the simple workaround of course would be finding out why it's not opening a space to open this in the codespace, but I can't square it. In my cloud console it shows that the first flow has succeeded

"Task Runs
51
51
Completed
100%"

Other fun bits and bobs: If I tell it I do want to re-authenticate, the following happens:

@user ➜ /workspaces/Prefect (main) $ prefect cloud login
It looks like you're already authenticated on this profile.
? Would you like to reauthenticate? [y/N]: y
? How would you like to authenticate? [Use arrows to move; enter to select]
 Log in with a web browser 
> Paste an API key 
Paste your API key: 
Authenticated with Prefect Cloud! Using workspace 'user/default'.
@user ➜ /workspaces/Prefect (main) $ ls
LICENSE README.md prefect_01_getting_started.py quickstart
@user ➜ /workspaces/Prefect (main) $ prefect-cloud deploy 01_getting_started.py:main \
> --name my_first_deployment \
> --from https://github.com/PrefectHQ/quickstart

same hanging. Feeling like I'm losing my mind in this loop. Please help.

Answer*

Draft saved
Draft discarded
Cancel

AltStyle によって変換されたページ (->オリジナル) /