zestsoftware / zest.releaser

Python software releasing made easy and repeatable
https://zestreleaser.readthedocs.io
GNU General Public License v2.0
198 stars 62 forks source link

section 'myserver' not found using twine #327

Closed iham closed 5 years ago

iham commented 5 years ago

i have a self hosted pypi server. now using https.

i always used my custom server inside setup.cfg

[distutils]
index-servers =
  myserver

[myserver]
repository = https://pypi.myserver.com/
username = myserver
password = myserver

[zest.releaser]
no-input = yes
version-levels = 3
development-marker = .dev

... also tried

no luck.

i get this:

twine.exceptions.InvalidConfiguration: Missing 'myserver' section from the configuration file
or not a complete URL in --repository-url.
Maybe you have a out-dated '~/.pypirc' format?

i explicitly don't wan't to use the user pypirc as my releases are done from a CI server.

any help? @mauritsvanrees ?

iham commented 5 years ago

also tried

[myserver]
repository: https://pypi.myserver.com/
username: myserver
password: myserver
reinout commented 5 years ago

You say

i always used my custom server inside setup.cfg

Is this something that broke recently? I think that, if it worked, it must have been years ago before we switched to using twine.

In twine's issue list, I find this one: https://github.com/pypa/twine/issues/230 . That says that twine doesn't listen to the setup.cfg. You have to use a pypirc file, basically.

An alternative is to use twine's environment variables (https://github.com/pypa/twine#environment-variables), that normally works quite OK with CI servers.

@mauritsvanrees might have more ideas and tips. I'm only uploading stuff to the main pypi :-)

iham commented 5 years ago

@reinout

i recently switched to https on my private pipy server.

thank you for that info about env-vars! will give it a try and currently create a pypirc file on the fly inside the CI - not as nice, but worked for the moment.