-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Poetry 1.1.0 not able to use repository environment variable with private feed #3059
Comments
I have the same issue. I removed
|
@andrew-zimmerman-rseg I believe that your configuration is incorrect. You need to be using $ env | grep POETRY
POETRY_HTTP_BASIC_FEED_USERNAME=awesomeuser
POETRY_REPOSITORIES_FEED_URL=https://feed.pkgs.visualstudio.com/_packaging/feed/pypi/simple/
POETRY_HTTP_BASIC_FEED_PASSWORD=coolpassword
$ poetry@1.1.0 new foobar
Created package foobar in foobar
$ cd foobar/
$ poetry@1.1.0 publish
No files to publish. Run poetry build first or use the --build option.
$ poetry@1.1.0 publish --build -r feed
Creating virtualenv foobar in /tmp/foobar/.venv
Building foobar (0.1.0)
- Building sdist
- Built foobar-0.1.0.tar.gz
- Building wheel
- Built foobar-0.1.0-py3-none-any.whl
Publishing foobar (0.1.0) to feed
- Uploading foobar-0.1.0-py3-none-any.whl 100%
UploadError
HTTP Error 405: Method Not Allowed
at ~/.local/pipx/venvs/poetry@1.1.0/lib64/python3.8/site-packages/poetry/publishing/uploader.py:216 in _upload
212│ self._register(session, url)
213│ except HTTPError as e:
214│ raise UploadError(e)
215│
→ 216│ raise UploadError(e)
217│
218│ def _do_upload(
219│ self, session, url, dry_run=False
220│ ): # type: (requests.Session, str, Optional[bool]) -> None The
Reminder that I suspect that in Also, note that there is a known bug (#3052) when the source and publish url use the same name. This will be resolved in |
It does look like my issue was due to setting the environment variable like Does it make sense to make note of this in the documentation? In reading through https://python-poetry.org/docs/configuration/#using-environment-variables it would not be obvious to me that I would need to append "_URL" to this environment variable (though it's entirely possible I'm missing something obvious here 😄). But the setting is Really appreciate the help getting me straightened out here and all of the hard work being done on this project. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
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: Debian GNU/Linux 10
Poetry version: 1.1.0
Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/andrew-zimmerman-rseg/40c7ed84fe8ab521ef2c2b6c3e7ffcf0
Issue
Noticed this originally on our CI tool of Azure Pipelines using internal artifact feed but able to reproduce otherwise. It seems that with the change to poetry 1.1.0 we are unable to set our repository config as environment variables.
Failure on 1.1.0:
Successful example on poetry 1.0.10:
The text was updated successfully, but these errors were encountered: