https://prefect.io logo
Title
t

Tony Piazza

09/23/2022, 1:23 PM
starting yesterday, i have been unable to login via the CLI:
prefect cloud login
Key: <my-generated-api-key>
Unable to authenticate with Prefect Cloud. Please ensure your credentials are correct.
I tried generating another API key but got the same result.
c

Chris Gunderson

09/23/2022, 1:25 PM
prefect cloud login -k "key", right?
Are you using a docker image?
t

Tony Piazza

09/23/2022, 1:26 PM
prefect cloud login -k "key", right?
I tried all variations.
Are you using a docker image?
No, just running local on my Windows machine.
Was working fine up until yesterday.
c

Chris Gunderson

09/23/2022, 1:27 PM
I used a docker image
Gotcha. I had an issue with this and did this when building my docker image.
# set prefect cloud defaults
RUN . $VENV_PATH/bin/activate
RUN /bin/sh -c "prefect config set PREFECT_API_URL=$(cat ./api_url.txt)"
RUN /bin/sh -c "prefect config set PREFECT_API_KEY=$(cat ./api_key.txt)"
Check it with "prefect config view" to see if it is set or not (guessing it isn't)
t

Tony Piazza

09/23/2022, 1:40 PM
everything looks appears as expected....
j

Jeff Hale

09/23/2022, 2:01 PM
Sorry to hear that Tony. Did the API key expire yesterday? You can check under the API Keys in the GUI.
t

Tony Piazza

09/23/2022, 3:25 PM
i have 3 keys created in the last 2 days and none of them work 😞
also noticed the UI changed recently....
j

Jeff Hale

09/23/2022, 4:07 PM
UI shouldn't have changed too substantively. Hmm. Still using app.prefect.cloud I assume. You could check the API key for the active profile in the .prefect folder in your root director.
t

Tony Piazza

09/23/2022, 4:26 PM
this is a show stopper. how to I raise an issue to get this resolved?
profile is empty
j

Jeff Hale

09/23/2022, 4:31 PM
Strange that profile is empty. This section of the docs shows how to create a profile. You should see the
Profile file update with the info.
Then you can use that profile with
prefect profile use thatprofile
to authenticate.
t

Tony Piazza

09/23/2022, 4:39 PM
i deleted the profile in an attempt to set everything up fresh.
where do i get PREFECT_API_URL value from?
a

Anna Geller

09/23/2022, 8:52 PM
Hi @Tony Piazza, can you create a new conda environment, install latest Prefect version, generate a new API key and then run:
prefect cloud login
to install latest, you can do:
pip install prefect -U
t

Tony Piazza

09/23/2022, 8:56 PM
@Anna Geller when I execute
prefect cloud login
, it prompts me for a key, which I copy from the Prefect API keys page.
I upgraded to latest version of Prefect earlier using
pip install prefect -U
i have never used Conda.
we use pip only.
and I never needed it when using Prefect up until last 2 days.
a

Anna Geller

09/23/2022, 9:23 PM
that's fine, silly question but are you using Cloud 2? https://app.prefect.cloud/
can you share the output of
prefect version
?
t

Tony Piazza

09/23/2022, 9:24 PM
Version:             2.4.2
API version:         0.8.0
Python version:      3.9.13
Git commit:          65807e84
Built:               Fri, Sep 23, 2022 10:43 AM
OS/Arch:             win32/AMD64
Profile:             combocurve
Server type:         cloud
ok, now i'm confused....
what's the difference between app.prefect.cloud and cloud.prefect.io ?
@Anna Geller that seems to be the source of this issue..... see my prev question.
a

Anna Geller

09/23/2022, 9:48 PM
app.prefect.cloud = Cloud 2 = the default Cloud right now = the one you should be using cloud.prefect.io = Cloud 1 = you should not be using this with Prefect 2, it won't work; this is only for Prefect 1
t

Tony Piazza

09/23/2022, 9:50 PM
thx for the clarification. i am good now. have a great weekend!
👍 1
:thank-you: 1
a

Anna Geller

09/23/2022, 9:53 PM
same goes to you! 🙌