# NuGet Package Registry for PowerShell Modules

**URL:** <https://forum.gitea.com/t/nuget-package-registry-for-powershell-modules/11226>\
**Category:** Gitea Usages\
**Created:** [May 4, 2025, 2:53pm UTC](https://forum.gitea.com/t/nuget-package-registry-for-powershell-modules/11226 "2025-05-04T14:53:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![marvint24](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/marvint24/32/6836_2.png) [@marvint24](https://forum.gitea.com/u/marvint24)\
**Post date:** [May 4, 2025, 2:53pm UTC](https://forum.gitea.com/t/nuget-package-registry-for-powershell-modules/11226/1 "2025-05-04T14:53:46Z")

</div>

My goal is using Gitea as a registry for custom PowerShell modules.  
To a certain level it also works fine, but some things don’t work as expected and I am not sure if it is a bug, a limitation or wrong usage.

I created this repo with a test module: [GitHub - marvint24/PWSHTest](https://github.com/marvint24/PWSHTest)

Registering, publishing works fine, but installing fails.

  

```powershell
Install-Module -Name PWSHTest -Repository Gitea

```

Result:

```powershell
Install-Package: No match was found for the specified search criteria and module name 'PWSHTest'. Try Get-PSRepository to see all
available registered module repositories.

```

  

But I can find it with:

```powershell
Find-Module -Name * -Repository Gitea

```

Result:

```powershell
Version Name Repository Description
------- ---- ---------- -----------
0.1.3 PWSHTest Gitea A test PowerShell module

```

  

If I try to find it directly by name `Find-Module -Name PWSHTest -Repository Gitea` it also fails.

I wanted to know if it is a problem with Gitea or with my module / publish process and I installed [Sonartype Nexus](https://medium.com/@chiemelaumeh1/install-sonatype-nexus-3-using-docker-compose-setup-nexus-repository-manager-for-node-js-project-47a3c5efe1ee).  
This seams to work fine, no problems with finding or installing modules.

After this I went down the PowerShell Module rabbit hole deeper and found out that there are also different modules in PowerShell to handle modules. This is what I found out:

| Name | PowerShell Version | Commands | Works with Gitea |
| --- | --- | --- | --- |
| [PowerShellGet](https://learn.microsoft.com/en-us/powershell/module/powershellget) | 5.1 - Installs itself on first run   
 7 - Installs itself on first run  
 | Register-PSRepository, Unregister-PSRepository   
 Get-PSRepository  
 Publish-Module   
 Install-Module, Uninstall-Module  
 Find-Module   
 | Publish ✅   
 Find ➖ Only \* finds the modules   
 Install ❌   
 Update ❌   
 |
| [PSResourceGet](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.psresourceget) | 5.1 - [Install](https://learn.microsoft.com/en-us/powershell/gallery/powershellget/update-powershell-51)  
 7 - Already installed   
 | Register-PSResourceRepository, Unregister-PSResourceRepository   
 Get-PSResourceRepository  
 Publish-PSResource   
 Install-PSResource, Uninstall-PSResource  
 Find-PSResource   
 | Publish ✅   
 Find ➖ Find \* doesn't work   
 Install ✅ Installing dependencies is not supported   
 Update ✅ Installing dependencies is not supported   
 |

Does anyone have tips or directions what I could do next? With PSResourceGet I found a way that works, but I think it is not ideal.

---

<div class="post-metadata">

**Author:** ![senna-fox](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/senna-fox/32/6883_2.png) [@senna-fox](https://forum.gitea.com/u/senna-fox)\
**Post date:** [May 13, 2025, 5:26pm UTC](https://forum.gitea.com/t/nuget-package-registry-for-powershell-modules/11226/2 "2025-05-13T17:26:50Z")

</div>

I’ve been seeing similar issues to yours. Publishing works fine, and sometimes I can even `Find-Module -Name PWSHTest -Repository Gitea` but install never works. The issue seems to be a miscommunication between Gitea & PowerShellGet

```PowerShell
Find-Module -Name PWSHTest -Repository Gitea -Verbose
VERBOSE: Suppressed Verbose Repository details, Name = 'Gitea', Location = 'https://gitea.xxx.com/api/packages/audrey/nuget/index.json'; IsTrusted = 'True'; IsRegistered = 'True'.
VERBOSE: Repository details, Name = 'Gitea', Location = 'https://gitea.xxx.com/api/packages/audrey/nuget/index.json'; IsTrusted = 'True'; IsRegistered = 'True'.
VERBOSE: Using the provider 'PowerShellGet' for searching packages.
VERBOSE: Using the specified source names : 'Gitea'.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'https://gitea.xxx.com/api/packages/audrey/nuget/index.json' and PackageManagementProvider is 'NuGet'.
VERBOSE: Retry downloading 'https://gitea.xxx.com/api/packages/audrey/nuget/registration/pwshtest/1.1.json' for '0' more times
VERBOSE: Total package yield:'0' for the specified package 'PWSHTest'.
Find-Package: No match was found for the specified search criteria and module name 'PWSHTest'. Try Get-PSRepository to see all available registered module repositories.

```

Navigating to [https://gitea.xxx.com/api/packages/audrey/nuget/registration/PWSHTest/1.1.json](https://gitea.xxx.com/api/packages/audrey/nuget/registration/PWSHTest/1.1.json) fails, but [https://gitea.xxx.com/api/packages/audrey/nuget/registration/PWSHTest/1.1.0.json](https://gitea.xxx.com/api/packages/audrey/nuget/registration/PWSHTest/1.1.0.json) works.  
I’m looking for a workaround to make this work, but so far nothing I’ve tried has helped.

---

<div class="post-metadata">

**Author:** ![marvint24](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/marvint24/32/6836_2.png) [@marvint24](https://forum.gitea.com/u/marvint24)\
**Post date:** [May 16, 2025, 8:48am UTC](https://forum.gitea.com/t/nuget-package-registry-for-powershell-modules/11226/3 "2025-05-16T08:48:13Z")

</div>

I created an issue on github: [Use NuGet Package Registry for PowerShell Modules · Issue #34486 · go-gitea/gitea · GitHub](https://github.com/go-gitea/gitea/issues/34486)

---

<div class="post-metadata">

**Author:** ![senna-fox](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/senna-fox/32/6883_2.png) [@senna-fox](https://forum.gitea.com/u/senna-fox)\
**Post date:** [June 5, 2025, 2:34pm UTC](https://forum.gitea.com/t/nuget-package-registry-for-powershell-modules/11226/4 "2025-06-05T14:34:02Z")

</div>

Been poking at this a bit more this morning. I haven’t been able to make it work, but I have determined the issue is that PowerShellGet requires a NuGet v2 feed. Despite [documentation’s](https://docs.gitea.com/next/usage/packages/nuget) claim otherwise, Gitea fails to completely implement v2 (only the ‘packages’ endpoint is routable.)

Given PowerShellGet is being phased out in favor of PSResouceGet, I’m not sure it’s worth correcting this. I’m resolving myself to just using PSResourceGet & manually installing dependencies.  
Supposedly this automation is coming (backed by the good word of Microsoft 🙄)  
Per [Microsoft Documentation](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.psresourceget/install-psresource?view=powershellget-3.x):

> `Install-PSResource` doesn’t install dependent resources from repositories that use the NuGet v3 protocol. You must install the dependent resources individually. **We intend to add this feature in a future release.**
