Unable to log into PyPI

I have an unexpected problem when logging into PyPI. I have the 2FA set up, and after providing the username and password I enter the authenticator code - but then I get the page with the following message:

Please confirm this login

We noticed you are attempting to log in from a new or previously unrecognized device. To ensure this is you, please check your email for a login confirmation link.

You should have received an email from noreply@pypi.org with the subject line “Unrecognized login to your PyPI account”.

In the future, you can automatically trust new devices without needing email verification by using a security device or passkey as your 2FA method. See https://pypi.org/help/#utfkey for more details.

However, the email never arrives - and I don’t think there should be an email when the 2FA is set up (as the page implies) in the first place? Any help in the right direction would be very appreciated.

If you go to the “Help” link on PyPI, and look at the question “I’ve lost access to my PyPI account. Can you help me?”, it suggests opening an issue on GitHub - pypi/support: Issue tracker for support requests related to using https://pypi.org · GitHub (the link in the help opens a “New issue” form directly). I suggest you try that.

Thank you Paul - I was looking through the help page, but I suppose I missed this question completely. :man_facepalming:

It has to specifically be a security key or a passkey. Logging in with TOTP will send you an email (and, if you have both TOTP and security key set up, you will be asked when logging in with TOTP, but not when using a security key).

I tried both, and in each case it said that an email was sent; but nothing arrived.

Hey, any luck with resolving this? I am having the same issue.

I did as Paul suggested and opened the ticket, and followed the instructions. Eventually I received an email and managed to get in.

1 Like