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

Authorization error using poetry 1.2 #6439

Closed
1 task
dougpool opened this issue Sep 7, 2022 · 5 comments
Closed
1 task

Authorization error using poetry 1.2 #6439

dougpool opened this issue Sep 7, 2022 · 5 comments
Labels
area/installer Related to the dependency installer kind/question User questions (candidates for conversion to discussion) status/duplicate Duplicate issues

Comments

@dougpool
Copy link

dougpool commented Sep 7, 2022

  • [ x] I am on the latest Poetry version 1.2

  • [ x] 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: Ubuntu 20.04

  • Poetry version: 1.2

  • Link of a Gist with the contents of your pyproject.toml file: N/A

Issue

When running poetry install under 1.2 against a private pypi repo hosted in gitlab, I now get an authorization error. This previously worked under poetry 1.1.15

Note that the variable PROJECT_ACCESS_TOKEN is being properly dereferenced and as mentioned, this does work under poetry 1.1.15

CICD log file

poetry config repositories.abcd https://git.somedomain.com/api/v4/projects/76/packages/pypi
$ poetry config http-basic.abcd pypi-tokens $PROJECT_ACCESS_TOKEN
Using a plaintext file to store credentials
$ poetry config virtualenvs.create false
Updating dependencies
Resolving dependencies...
Source (ABCD_Gitlab): Authorization error accessing https://git.somedomain.com/api/v4/projects/76/packages/pypi/simple/pytest-mock/
Source (ABCD_Gitlab): Authorization error accessing https://git.somedomain.com/api/v4/projects/76/packages/pypi/simple/pytest-asyncio/
[Same authorization error then repeats for all python dependencies]

Work Around

Install/use poetry <1.2

@dougpool dougpool added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Sep 7, 2022
@dimbleby
Copy link
Contributor

dimbleby commented Sep 7, 2022

It's just a log. Duplicate #6422 / #5984

@neersighted neersighted added area/installer Related to the dependency installer kind/question User questions (candidates for conversion to discussion) status/duplicate Duplicate issues and removed kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Sep 7, 2022
@neersighted neersighted closed this as not planned Won't fix, can't repro, duplicate, stale Sep 7, 2022
@dougpool
Copy link
Author

dougpool commented Sep 7, 2022

Not sure how I missed those issues, then I guess I have another problem somewhere in my build because with poetry 1.2, the CICD job fails with ERROR: Job failed: exit code 1 but works just fine with 1.1.15

Thanks for the prompt reply and I will dive deeper on my end (maybe how gitlab is processing the log, idk)

@neersighted
Copy link
Member

Failures to authenticate shouldn't cause Poetry to exit with a failure status -- if there was an issue getting all the packages needed during poetry install you should get an exception stating as much. Good luck in your debugging!

@neersighted
Copy link
Member

I see a poetry config virtualenvs.create false in there -- there's a solid chance your build is broken as installing to the system environment (especially if Poetry is there) is a bit fraught. You'll need to closely inspect your logs, but I wouldn't be surprised if there were weird errors about invalid version numbers or missing files because of that line.

Copy link

github-actions bot commented Mar 1, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/installer Related to the dependency installer kind/question User questions (candidates for conversion to discussion) status/duplicate Duplicate issues
Projects
None yet
Development

No branches or pull requests

3 participants