Skip to content
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

Add flit publish --certificate *Path_to_certificate* option #517

Open
yoannmos opened this issue Jan 23, 2022 · 3 comments
Open

Add flit publish --certificate *Path_to_certificate* option #517

yoannmos opened this issue Jan 23, 2022 · 3 comments

Comments

@yoannmos
Copy link

📑 Description

It could be very helpful to add the possibility to verify with certificate when using the command flit publish.
Adding the path of the desired public key certificate with an option like --cert or --certificate.

💡 Solution Idea

requests.post() take the optionnal argument verify=*Path_to_certificate* adding an optionnal argument to upload_file(), do_upload(), main() and adding parsing in __init__.py could maybe do the trick.

🚨 Slightly Unrelated Problem

Some tests are failling out of the box
I get few InstallTests failed running on win11.
Globally it's an error with the uppercase letter of the disk drive.
assert 'C:\\Users\\y...les\\package1' == 'c:\\Users\\y...les\\package1'
Does anyone get the same errors ?
Any idea if it's solvable without messing with CI ?

🖊️ PS

I'm trying to implement it but I'm not an expert so... if someone with more experience want to implement it I will be happy to learn with your version. 😉

@yoannmos yoannmos changed the title Add flit publish --certificate *Path_to_certificate* Add flit publish --certificate *Path_to_certificate* option Jan 23, 2022
@takluyver
Copy link
Member

I assume this is to publish to a private index that uses a self-signed cert or something? It sounds like a reasonable addition. If you need a workaround in the meantime, you can use flit build to create the packagesand thentwine upload` to upload them.

I get few InstallTests failed running on win11. Globally it's an error with the uppercase letter of the disk drive.

Oh, Windows... I thought drive letters were always uppercase, but I guess not. Feel free to open a new issue about this, with the full details of the test failures. I don't have Windows locally, so I haven't seen this (the Windows CI appears to be OK).

@yoannmos
Copy link
Author

Thanks for your feedback.
Exactly I tend to use flit everywhere... (more reliable than others tools for my uses)
Yep I use twine actually but after making another CI yaml I was thinking it can be way cleaner with flit.

I will just try on a win10 machine before posting the issue for the failed test.

@acidjunk
Copy link

acidjunk commented Mar 9, 2023

I also would like to have this option: as I makes it easier to use your own pypi repo like: https://www.sonatype.com/products/nexus-repository

For now switching to TWINE for the publish step.

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

No branches or pull requests

3 participants