-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Confusing error messages with missing config file #564
Comments
I think Twine is asking for credentials because it's not finding a match for the default Alternatively, you can specify the repository name as an argument:
|
I think @bhrutledge is right. I'm also curious what you expected to happen, @pe2mbs. Is |
Actually, it looks like the That said, I still think changing |
forwarder is the name of the repository. |
Right, adding I think i have the wrong thing about this, i was expecting that in the .pypirc file you could define username/password per package to upload the pypi. When i configured:
It worked. And when i configured
It worked as well. |
@pe2mbs Can you try this?
I think this should work now:
|
@bhrutledge the info provided above gives the following error.
|
@pe2mbs I'm surprised to see that error. I copied and pasted my suggested contents into a new file, and got this result:
Which is what I would expect, because I didn't change Are you sure that you're using the correct
|
Since we haven't heard from @pe2mbs in awhile, and in light of my last comment, I'm going to close this. If folks are still getting this error, feel free to post comments, and we can re-open if necessary. |
I ran into something similar when using
So I mistakenly thought the file was there with an outdated format (I have twine 3.4.1). A nice change would be if a non-existent config file path raised a different error instead:
|
Ah, thanks @angerson. Here's a complete reproducing command example:
I agree that something like what the error message proposed would be better. Interestingly, if you omit the
In this case, I think Twine should show a warning, but continue with the current behavior of manually entering credentials. With that in mind, I'm happy to reopen this. |
I'm working on this, and taking the opportunity to clarify/simplify the config file logic and tests. Work-in-progress: main...bhrutledge:564-config-file |
Released in https://pypi.org/project/twine/3.4.2/ |
Update 6/17/2021: After discussion/troubleshooting of the original issue, a possible resolution seems to be more helpful error and warning messages for missing configuration files; see #564 (comment).
Your operating system:
Linux matrix 4.15.0-72-generic Restrict requests to at least 2.0 #81-Ubuntu SMP Tue Nov 26 12:20:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Version of python you are running:
Python 3.6.9
How did you install twine? Did you use your operating system's package manager or pip or
pip 19.0.3 from /usr/local/lib/python3.6/dist-packages/pip (python 3.6)
Version of twine you have installed (include complete output of):
twine version 3.1.1 (pkginfo: 1.5.0.1, requests: 2.21.0, setuptools: 39.0.1,
requests-toolbelt: 0.8.0, tqdm: 4.19.5)
Which package repository are you targeting?
https://upload.pypi.org/legacy/
The Issue
I added to the .pypirc in my home folder
But when i upload the package to the repository it asks for my username/password.
Steps to Reproduce
When i to
I get the same result
When i copy the ${HOME}/.pypirc to my project folder
twine upload ./dist/* --config-file ./.pypirc
Same result
The text was updated successfully, but these errors were encountered: