Skip to content

Instantly share code, notes, and snippets.

@blakeNaccarato
Created April 11, 2023 17:03
Show Gist options
  • Save blakeNaccarato/7dd16cec73798127bb0017af01f09c9e to your computer and use it in GitHub Desktop.
Save blakeNaccarato/7dd16cec73798127bb0017af01f09c9e to your computer and use it in GitHub Desktop.
Publishing with flit and keyring

Copy/paste may not work as expected in the VSCode integrated terminal when running flit publish and pasting a password/token. You should create a one-time token on PyPi, with entire account scope, then in an external terminal window, run flit publish. There you can paste your token, you may have to do "Ctrl+Shift+V", or "Win+V" and click the token in your clipboard. If this step fails, you have to go to "Credential Manager" and delete the http://upload.pypi.org/legacy credential and try again. When done, be sure to delete the local credential, AND remove the credential from PyPi. You don't need to keep an account-scope credential around forever, just make one when needed and revoke it right after.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment