Skip to content

Use NuGet Package Registry for PowerShell Modules #34486

Open
@marvint24

Description

@marvint24

Description

Referring to my post in the forum: https://forum.gitea.com/t/nuget-package-registry-for-powershell-modules/11226

My goal is using Gitea as a registry for custom PowerShell modules.

Current behavier

  • Registering gitea as PSRepository works well.
  • Publishing my module works too.
  • Finding the module works not correct.
  • Installing Module doesn't work.

The problem occurs with PowerShell 5.1 on Windows and PowerShell 7 on Windows / Linux

Expected behavier

The NuGet package registry should work as PowerShell module repository.

Steps to reproduce

You can use this code https://github.com/marvint24/PWSHTest to test it.

  1. Clone repo
  2. Create an access token in gitea
  3. Run the publishModule.ps1 file like as described in the readme

After that you should find the package in gitea.

You can find the PowerShell module with:

Find-Module -Name "*" -Repository Gitea -Verbose

But not with:

Find-Module -Name "PWSHTest" -Repository Gitea -Verbose

You cannot install the module with:

Install-Module -Name "PWSHTest" -Repository Gitea -Verbose

Gitea Version

1.23.8

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

https://gist.github.com/marvint24/da65ff545a0b207dcd46003aef411be7

Screenshots

Image

Git Version

2.45.2

Operating System

gitea docker image (Alpine 3.20.3)

How are you running Gitea?

I am using a docker compose file like https://docs.gitea.com/installation/install-with-docker

Database

SQLite

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions