Skip to content

Nuget NotFound package with version suffex like (1.0.0-rc.1+r12345.26a7053f) #22178

Closed
@m2nlight

Description

@m2nlight

Description

We always make nupkg files to append VCS version like 1.0.0-rc.1+r12345.26a7053f

The gitea nuget repo page (ex: http://gitea:3000/testorg/-/packages/nuget/test.pkg.scanner/1.0.0-rc.1+r12345.26a7053f) is okey.
And the tip info:

dotnet add package --source Gitea --version 1.0.0-rc.1+r12345.26a7053f Test.Pkg.Scanner

VS2022 get some errors when restore this package:

GET http://gitea:3000/api/packages/testorg/nuget/package/test.pkg.scanner/index.json
OK http://gitea:3000/api/packages/testorg/nuget/package/test.pkg.scanner/index.json 921 ms
GET http://gitea:3000/api/packages/testorg/nuget/package/test.pkg.scanner/1.0.0-rc.1/test.pkg.scanner.1.0.0-rc.1.nupkg
NotFound http://gitea:3000/api/packages/testorg/nuget/package/test.pkg.scanner/1.0.0-rc.1/test.pkg.scanner.1.0.0-rc.1.nupkg 303 ms
...

I got that from the index.json

{"versions":["1.0.0-rc.1","1.0.0-preview.1"]}

I guess real package address is http://gitea:3000/api/packages/testorg/nuget/package/test.pkg.scanner/1.0.0-rc.1/test.pkg.scanner.1.0.0-rc.1+r12345.26a7053f.nupkg

The index.json should be

{"versions":["1.0.0-rc.1+r12345.26a7053f","1.0.0-preview.1"]}

Gitea Version

1.18.0+rc1

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

gitea in docker

Database

None

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions