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

Local Package Identifiers not currently supported in Gitea #21683

Closed
Racer159 opened this issue Nov 4, 2022 · 1 comment · Fixed by #21690
Closed

Local Package Identifiers not currently supported in Gitea #21683

Racer159 opened this issue Nov 4, 2022 · 1 comment · Fixed by #21690

Comments

@Racer159
Copy link
Contributor

Racer159 commented Nov 4, 2022

Description

When running Gitea as a private PyPi package registry there may be packages that do not match the canonical public version and instead use a local version identifier as outlined in PEP-0440. An example of this could be an internally forked version of certify https://pypi.org/project/certifi/#files that includes custom CAs specific to that organization.

When attempting to use these packages with Gitea it will return a 400 Bad Request with "invalid name or version"

Gitea Version

1.17.3

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

https://gist.github.com/Racer159/8aa895f1ffd62fb56d567d26e812c973

Screenshots

image

Git Version

2.38.0

Operating System

popOS 22.04

How are you running Gitea?

For this testing/log locally off of the main branch, but in production it is inside of the official Gitea chart, specifically version 6.0.3.

Database

SQLite

@Racer159
Copy link
Contributor Author

Racer159 commented Nov 4, 2022

Also as a note, to quickly make a version that matches you can do the following:

  1. Download the latest Built version of certify from here: https://pypi.org/project/certifi/#files
  2. Extract the .whl as a zip archive
  3. Rename the .dist-info folder to include the +<local_id>
    image
  4. Inside of that folder, edit the METADATA file to include the +<local_id> on its version
    image
  5. Rezip the two folders into a .whl named with the new local id version. (these folders should be at the root of the archive)
    image

lafriks pushed a commit that referenced this issue Nov 7, 2022
Racer159 pushed a commit to Racer159/gitea that referenced this issue Nov 8, 2022
Racer159 pushed a commit to Racer159/gitea that referenced this issue Nov 8, 2022
lunny added a commit that referenced this issue Nov 9, 2022
lunny added a commit that referenced this issue Nov 9, 2022
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants