Skip to content

poetry publish - prompting for password during CI builds #1843

@nackjicholson

Description

@nackjicholson
  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • [] If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: macos catalina
  • Poetry version: 1.0.0

Issue

poetry publish seems to be looking for a password that should exist, but can't be found. Perhaps it's not being stored properly by poetry config, or perhaps it's not being looked for in the right location.

On local macos:

Contents of my auth.toml, leftover from when I was on 0.12.13

[http-basic]
[http-basic.my-pypi]
username = "foo"
password = "bar"

Then I run poetry config http-basic.my-pypi foo bar

and the password poofs from the file.

[http-basic]
[http-basic.my-pypi]
username = "foo"

Locally on macos this is fine, because apparently the password is stored in the keychain app and poetry will ask for permission to pull it out of there when it needs to.

On travisci

before_deploy:
- poetry config http-basic.my-pypi $USER_VAR $PASS_VAR

there is no keychain app, so I'm seeing a poetry publish call hang on a Password: prompt because I presume in the absence of a Keychain-ish app the password isn't being saved anywhere that poetry can pull it from.

I saw this possibly related PR #1788
Would that code fix this problem? If so, we could use a patch release because currently 1.0.0 is breaking the ability to publish of packages from Travis CI where it's necessary to rely on the poetry config http-basic.my-pypi $U $P command to set auth values that poetry publish knows how to lookup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions