flit
flit copied to clipboard
Problem with Username and Password when publishing
Hello everybody,
I'm quite new at packaging: that's my first time. I've been told by many people that flit is the best and easier tool to publish a package.
So, I'm trying.
I've install flit using python3 -m pip install flit. Then, I've launch flit script in the repertory I want to package by: flit init. Finally, I try flit publish.
But I'm stuck here:
Writing generated setup.py I-flit.sdist
Built sdist: dist/RiemannSphere-1.0.tar.gz I-flit_core.sdist
Copying package file(s) from /var/folders/yt/w719pb7551j9yn78qk5d5shr0000gn/T/tmp78xctcrx/RiemannSphere-1.0/RiemannSphere.py I-flit_core.wheel
Writing metadata files I-flit_core.wheel
Writing the record of files I-flit_core.wheel
Built wheel: dist/RiemannSphere-1.0-py2.py3-none-any.whl I-flit_core.wheel
Using repository at https://upload.pypi.org/legacy/ I-flit.upload
Install keyring to store passwords securely W-flit.upload
Server : https://upload.pypi.org/legacy/
Username: pytest
Password:
I've created an account, but the username is not pytest... I do not remember to have entered this somewhere when installing flit... How to change this Username?
Could someone gives me some help, please?
Hi! Do you have a .pypirc file in your home folder? That might have the wrong username stored in it.
(The bit about finding PyPI login credentials is definitely a weak spot at the moment - it's focused on making things 'just work' for an experienced user who's already got things set up, and doesn't do a great job at helping you correct when there's a mistake)
Thanks you for your rapid answer,
I did not have got a .pypirc in my home folder. Then, I tried with one whose content was
[server-login]
repository: https://pypi.python.org/pypi
username: tolliob
password: xxxxxxx
But it change nothing...
Actually, I do not understand where the flit Username pytest comes from... Could it be when installing flit?
Have you maybe set a FLIT_USERNAME environment variable? Try echo $FLIT_USERNAME in a terminal.
The group in the config file should be called [pypi] (rather than [server-login]) for Flit to use it by default.
This is where it looks for your username (click through to that file if you want to check the code to find it):
https://github.com/takluyver/flit/blob/cfd71d81be95300266c6e989cf2d1bf57aa637fc/flit/upload.py#L75-L79