Open junkiebev opened 5 years ago
My /v3/index.json
file looks like this
{
"version": "3.0.0",
"resources": [
{
"@id": "http://chd9fmks1dt.COMPANY.com:5555/api/v2/package",
"@type": "PackagePublish/2.0.0",
"comment": ""
},
{
"@id": "http://chd9fmks1dt.COMPANY.com:5555/api/v2/symbol",
"@type": "SymbolPackagePublish/4.9.0",
"comment": ""
},
{
"@id": "http://chd9fmks1dt.COMPANY.com:5555/v3/search",
"@type": "SearchQueryService",
"comment": ""
},
{
"@id": "http://chd9fmks1dt.COMPANY.com:5555/v3/search",
"@type": "SearchQueryService/3.0.0-beta",
"comment": ""
},
{
"@id": "http://chd9fmks1dt.COMPANY.com:5555/v3/search",
"@type": "SearchQueryService/3.0.0-rc",
"comment": ""
},
{
"@id": "http://chd9fmks1dt.COMPANY.com:5555/v3/registration/",
"@type": "RegistrationsBaseUrl",
"comment": ""
},
{
"@id": "http://chd9fmks1dt.COMPANY.com:5555/v3/registration/",
"@type": "RegistrationsBaseUrl/3.0.0-rc",
"comment": ""
},
{
"@id": "http://chd9fmks1dt.COMPANY.com:5555/v3/registration/",
"@type": "RegistrationsBaseUrl/3.0.0-beta",
"comment": ""
},
{
"@id": "http://chd9fmks1dt.COMPANY.com:5555/v3/package/",
"@type": "PackageBaseAddress/3.0.0",
"comment": ""
},
{
"@id": "http://chd9fmks1dt.COMPANY.com:5555/v3/autocomplete",
"@type": "SearchAutocompleteService",
"comment": ""
},
{
"@id": "http://chd9fmks1dt.COMPANY.com:5555/v3/autocomplete",
"@type": "SearchAutocompleteService/3.0.0-rc",
"comment": ""
},
{
"@id": "http://chd9fmks1dt.COMPANY.com:5555/v3/autocomplete",
"@type": "SearchAutocompleteService/3.0.0-beta",
"comment": ""
}
]
}
Looks like it might be an issue with Oneget’s JSON parser:
Yes, this looks like a bug in OneGet here as it requires a "type" property on registration resources, which is not required by the official registration documentation. I'd like to understand why OneGet needs this type property before changing anything in BaGet.
@junkiebev did you find any solutions to this yet? I am looking into BaGet primarily for Powershell modules as well but running into the same issue.
This should be fixed by https://github.com/loic-sharma/BaGet/pull/249 and released in release v0.1.75-prerelease. Can you verify @arnydo or @junkiebev? Thanks!
@loic-sharma is the image on Dockerhub or should I roll my own?
Yes, the latest image in dockerhub should work too.
0.1.175-prerelease
.2.0.4
1.3.1
Is there a different Source Location than given in the PowerShell setup instructions?
Register-PSRepository -Name "BaGet" -SourceLocation "http://<host-fqdn>/v3/index.json" -PublishLocation "http://<host-fqdn>/api/v2/package" -InstallationPolicy "Trusted"
Just installed release version 0.1.175-prerelease.
Environment
Windows 10 Client PowerShell 5.1 Desktop PackageManagement Modules:
PowerShellGet 2.0.4 PackageManagement 1.3.1
Published a PowerShell module and still run into this:
Is there a different Source Location than given in the PowerShell setup instructions? Register-PSRepository -Name "BaGet" -SourceLocation "http://
/v3/index.json" -PublishLocation "http:// /api/v2/package" -InstallationPolicy "Trusted"
Can you run it with -Debug
rather than -Verbose
and provide the output?
Find-Module -Name 'WinSCP' -Repository 'BaGit' -Verbose -Debug
Find-Module -Name 'WinSCP' -Repository 'BaGit' -Verbose -Debug
In the debug of the first run powershell tries to reach the repository via 'http://localhost:5000/' instead of the given hostname: http://baget/v3/index.json
points to urls which can't be accessed through a reverse proxy. -> Is there a way to change this?
Second try the debug output is different and there is no ref to http://localhost:5000
C:\tools\PhabricatorCLI
λ ipmo powershellget
C:\tools\PhabricatorCLI
λ Find-Module -Name 'WinSCP' -Repository 'BaGet' -Verbose -debug
DEBUG: 00:00:00 Current running environment: Windows PowerShell.
Bestätigung Vorgang fortsetzen? [J] Ja [A] Ja, alle [B] Befehl anhalten [H] Anhalten [?] Hilfe (Standard ist "J"): A DEBUG: 00:00:00.0597353 Trying provider assembly: C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.3.1\fullclr\Microsoft.PackageManagement.NuGetProvider.dll DEBUG: 00:00:00.0597353 Trying provider assembly: C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.3.1\fullclr\Microsoft.PackageManagement.MetaProvider.PowerShell.dll DEBUG: 00:00:00.0598022 Trying provider assembly: C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.3.1\fullclr\Microsoft.PackageManagement.MsuProvider.dll DEBUG: 00:00:00.0598478 Trying provider assembly: C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.3.1\fullclr\Microsoft.PackageManagement.CoreProviders.dll DEBUG: 00:00:00.0601055 Trying provider assembly: C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.3.1\fullclr\Microsoft.PackageManagement.MsiProvider.dll DEBUG: 00:00:00.0601196 Trying provider assembly: C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.3.1\fullclr\Microsoft.PackageManagement.ArchiverProviders.dll DEBUG: 00:00:00.0704692 Attempting loading of assembly: C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.3.1\fullclr\Microsoft.PackageManagement.MsuProvider.dll DEBUG: 00:00:00.0706619 Attempting loading of assembly: C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.3.1\fullclr\Microsoft.PackageManagement.MetaProvider.PowerShell.dll DEBUG: 00:00:00.0720399 Attempting loading of assembly: C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.3.1\fullclr\Microsoft.PackageManagement.ArchiverProviders.dll DEBUG: 00:00:00.0723771 Attempting loading of assembly: C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.3.1\fullclr\Microsoft.PackageManagement.MsiProvider.dll DEBUG: 00:00:00.0724675 Attempting loading of assembly: C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.3.1\fullclr\Microsoft.PackageManagement.CoreProviders.dll DEBUG: 00:00:00.0735589 Attempting loading of assembly: C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.3.1\fullclr\Microsoft.PackageManagement.NuGetProvider.dll AUSFÜHRLICH: Acquiring providers for assembly: C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.3.1\fullclr\Microsoft.PackageManagement.MsuProvider.dll AUSFÜHRLICH: Acquiring providers for assembly: C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.3.1\fullclr\Microsoft.PackageManagement.CoreProviders.dll AUSFÜHRLICH: Acquiring providers for assembly: C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.3.1\fullclr\Microsoft.PackageManagement.MetaProvider.PowerShell.dll AUSFÜHRLICH: Acquiring providers for assembly: C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.3.1\fullclr\Microsoft.PackageManagement.NuGetProvider.dll AUSFÜHRLICH: Acquiring providers for assembly: C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.3.1\fullclr\Microsoft.PackageManagement.MsiProvider.dll AUSFÜHRLICH: Acquiring providers for assembly: C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.3.1\fullclr\Microsoft.PackageManagement.ArchiverProviders.dll DEBUG: 00:00:00.1254041 Registering providers via metaproviders for assembly Microsoft.PackageManagement.MetaProvider.PowerShell.Internal.PowerShellMetaProvider DEBUG: 00:00:00.1915831 Initializing provider 'WebDownloader' DEBUG: 00:00:00.1917626 Initializing provider 'msu' DEBUG: 00:00:00.1918587 Initializing provider 'Bootstrap' DEBUG: 00:00:00.1919808 Initializing provider 'zipfile' DEBUG: 00:00:00.1928285 Initializing provider 'Programs' DEBUG: 00:00:00.1928767 Initializing provider 'NuGet' DEBUG: 00:00:00.1931295 Initializing provider 'msi' DEBUG: 00:00:00.2385850 Provider 'WebDownloader' Initialized DEBUG: 00:00:00.2386314 Using Downloader Provider WebDownloader DEBUG: 00:00:00.2410316 Provider 'zipfile' Initialized DEBUG: 00:00:00.2410783 Using Archiver Provider zipfile DEBUG: 00:00:00.2456282 Calling 'Programs::InitializeProvider' DEBUG: 00:00:00.2457183 Provider 'Programs' Initialized DEBUG: 00:00:00.2457647 Using Package Provider Programs DEBUG: 00:00:00.2457559 Initialize Bootstrapper DEBUG: 00:00:00.2460106 Calling 'msi::InitializeProvider' DEBUG: 00:00:00.2460551 Provider 'msi' Initialized DEBUG: 00:00:00.2461030 Calling 'NuGet'::'InitializeProvider'. DEBUG: 00:00:00.2461247 Using Package Provider msi DEBUG: 00:00:00.2461418 Provider 'NuGet' Initialized DEBUG: 00:00:00.2461638 Using Package Provider NuGet DEBUG: 00:00:00.2463067 Calling 'msu::InitializeProvider' DEBUG: 00:00:00.2463364 Provider 'msu' Initialized DEBUG: 00:00:00.2463562 Using Package Provider msu DEBUG: 00:00:00.2483458 Provider 'Bootstrap' Initialized DEBUG: 00:00:00.2483884 Using Package Provider Bootstrap DEBUG: 00:00:00.2720917 Calling 'msu::GetFeatures' DEBUG: 00:00:00.2721176 Calling 'NuGet'::'GetFeatures'. DEBUG: 00:00:00.2724092 Calling 'Programs::GetFeatures' DEBUG: 00:00:00.2729231 Calling 'msi::GetFeatures' DEBUG: 00:00:00.2738407 Calling 'WebDownloader::GetFeatures' DEBUG: 00:00:00.2742049 Calling 'Bootstrap::GetFeatures' DEBUG: 00:00:00.2742190 Calling 'zipfile::GetFeatures' DEBUG: 00:00:00.2753788 The provider 'msi' is imported DEBUG: 00:00:00.2753788 The provider 'msu' is imported DEBUG: 00:00:00.2758114 The provider 'Programs' is imported DEBUG: 00:00:00.2758874 The provider 'Bootstrap' is imported DEBUG: 00:00:00.2761565 SUCCESS provider assembly: C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.3.1\fullclr\Microsoft.PackageManagement.MsuProvider.dll DEBUG: 00:00:00.2761588 SUCCESS provider assembly: C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.3.1\fullclr\Microsoft.PackageManagement.MsiProvider.dll DEBUG: 00:00:00.2767294 SUCCESS provider assembly: C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.3.1\fullclr\Microsoft.PackageManagement.CoreProviders.dll DEBUG: 00:00:00.2771198 The provider 'NuGet' is imported DEBUG: 00:00:00.2775452 SUCCESS provider assembly: C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.3.1\fullclr\Microsoft.PackageManagement.ArchiverProviders.dll DEBUG: 00:00:00.2788646 SUCCESS provider assembly: C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.3.1\fullclr\Microsoft.PackageManagement.NuGetProvider.dll DEBUG: 00:00:00.3096495 Trying to register metaprovider DEBUG: 00:00:00.3159628 Initializing PowerShell MetaProvider DEBUG: 00:00:00.3451721 Calling 'WebDownloader::DownloadFile' 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409','C:\Users\wkiv924\AppData\Local\Temp\Microsoft.PackageMana gement\u04swm1r.b4i','40000','False' AUSFÜHRLICH: Cannot download link 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409', retrying for '2' more times. DEBUG: 00:00:00.4265672 Calling 'WebDownloader::DownloadFile' 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409','C:\Users\wkiv924\AppData\Local\Temp\Microsoft.PackageMana gement\u04swm1r.b4i','40000','False' DEBUG: 00:00:00.4403494 Attempting to load PowerShell Provider Module [C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.0.4\PSModule.psm1] AUSFÜHRLICH: Cannot download link 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409', retrying for '1' more times. DEBUG: 00:00:00.4853849 Calling 'WebDownloader::DownloadFile' 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409','C:\Users\wkiv924\AppData\Local\Temp\Microsoft.PackageMana gement\u04swm1r.b4i','40000','False' AUSFÜHRLICH: Cannot download link 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409', retrying for '0' more times. DEBUG: 00:00:00.5091437 Das Stammelement ist nicht vorhanden. bei System.Xml.XmlTextReaderImpl.Throw(Exception e) bei System.Xml.XmlTextReaderImpl.ParseDocumentContent() bei System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options) bei System.Xml.Linq.XDocument.Load(String uri, LoadOptions options) bei Microsoft.PackageManagement.Providers.Internal.Bootstrap.Swid.DownloadSwidtag(IEnumerable`1 locations, BootstrapRequest request) DEBUG: 00:00:00.6850908 Loaded PowerShell package provider: '[C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.0.4\PSModule.psm1]'. DEBUG: 00:00:00.6931139 Loaded PowerShell Provider: PowerShellGet DEBUG: 00:00:00.6953294 Initializing provider 'PowerShellGet' DEBUG: 00:00:00.7030188 Calling New() : MethodName = 'InitializeProvider' DEBUG: 00:00:00.7030575 ErrorAction: SilentlyContinue DEBUG: 00:00:00.7030686 WarningAction: SilentlyContinue DEBUG: 00:00:00.7082517 INVOKING PowerShell Fn Initialize-Provider with args that has length 0 DEBUG: 00:00:00.7835836 In PowerShellGet Provider - 'Initialize-Provider'. DEBUG: 00:00:00.7838695 PowerShell Script 'PSModule' Function 'Initialize-Provider' returns null. DEBUG: 00:00:00.7845556 Done calling powershell «Initialize-Provider» «PSModule» DEBUG: 00:00:00.7846058 Provider 'PowerShellGet' Initialized DEBUG: 00:00:00.7846206 Using Package Provider PowerShellGet DEBUG: 00:00:00.7910567 Calling New() : MethodName = 'GetFeatures' DEBUG: 00:00:00.7910879 ErrorAction: SilentlyContinue DEBUG: 00:00:00.7911027 WarningAction: SilentlyContinue DEBUG: 00:00:00.7919869 INVOKING PowerShell Fn Get-Feature with args that has length 0 DEBUG: 00:00:00.8455484 In PowerShellGet Provider - 'Get-Feature'. DEBUG: 00:00:00.8668783 Done calling powershell «Get-Feature» «PSModule» DEBUG: 00:00:00.8669706 The provider 'PowerShellGet' is imported DEBUG: 00:00:00.8700216 SUCCESS provider assembly: C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.3.1\fullclr\Microsoft.PackageManagement.MetaProvider.PowerShell.dll DEBUG: 00:00:00.0000003 Calling New() : MethodName = 'ResolvePackageSources'
Bestätigung Vorgang fortsetzen? [J] Ja [A] Ja, alle [B] Befehl anhalten [H] Anhalten [?] Hilfe (Standard ist "J"): A DEBUG: 00:00:00.0005816 Verbose: False DEBUG: 00:00:00.0006435 Name: BaGet DEBUG: 00:00:00.0007043 ErrorVariable: ev DEBUG: 00:00:00.0035778 INVOKING PowerShell Fn Resolve-PackageSource with args that has length 0 DEBUG: 00:00:00.0828050 In PowerShellGet Provider - 'Resolve-PackageSource'. DEBUG: 00:00:00.5593141 Yielding package source for BaGet at location http://baget/v3/index.json DEBUG: 00:00:00.5637544 Done calling powershell «Resolve-PackageSource» «PSModule» DEBUG: 00:00:00.5862638 Calling New() : MethodName = 'GetDynamicOptions' DEBUG: 00:00:00.5862954 Verbose: False DEBUG: 00:00:00.5863102 Name: BaGet DEBUG: 00:00:00.5863239 ErrorVariable: ev DEBUG: 00:00:00.5873529 INVOKING PowerShell Fn Get-DynamicOptions with args Provider that has length 1 DEBUG: 00:00:00.6459269 In PowerShellGet Provider - 'Get-DynamicOptions'. DEBUG: 00:00:00.6716009 Done calling powershell «Get-DynamicOptions» «PSModule» DEBUG: 00:00:00.6748754 Calling New() : MethodName = 'GetDynamicOptions' DEBUG: 00:00:00.6748986 Verbose: False DEBUG: 00:00:00.6749119 Name: BaGet DEBUG: 00:00:00.6749244 ErrorVariable: ev DEBUG: 00:00:00.6755437 INVOKING PowerShell Fn Get-DynamicOptions with args Source that has length 1 DEBUG: 00:00:00.6762370 In PowerShellGet Provider - 'Get-DynamicOptions'. DEBUG: 00:00:00.6781366 Done calling powershell «Get-DynamicOptions» «PSModule» DEBUG: 00:00:04.7492505 Calling New() : MethodName = 'ResolvePackageSources' DEBUG: 00:00:04.7508646 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString DEBUG: 00:00:04.7528033 ProviderName: PowerShellGet DEBUG: 00:00:04.7537996 Verbose: False DEBUG: 00:00:04.7548241 Name: BaGet DEBUG: 00:00:04.7556820 ErrorVariable: ev DEBUG: 00:00:04.7576838 INVOKING PowerShell Fn Resolve-PackageSource with args that has length 0 DEBUG: 00:00:04.7593906 In PowerShellGet Provider - 'Resolve-PackageSource'. DEBUG: 00:00:04.7651102 Yielding package source for BaGet at location http://baget/v3/index.json DEBUG: 00:00:04.7669614 Done calling powershell «Resolve-PackageSource» «PSModule» DEBUG: 00:00:04.7793831 Calling New() : MethodName = 'ResolvePackageSources' DEBUG: 00:00:04.7806786 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString DEBUG: 00:00:04.7823501 ProviderName: PowerShellGet DEBUG: 00:00:04.7838714 Verbose: False DEBUG: 00:00:04.7878408 Name: BaGet DEBUG: 00:00:04.7887945 ErrorVariable: ev DEBUG: 00:00:04.7900030 INVOKING PowerShell Fn Resolve-PackageSource with args that has length 0 DEBUG: 00:00:04.7913293 In PowerShellGet Provider - 'Resolve-PackageSource'. DEBUG: 00:00:04.7937789 Yielding package source for BaGet at location http://baget/v3/index.json DEBUG: 00:00:04.7951322 Done calling powershell «Resolve-PackageSource» «PSModule» DEBUG: 00:00:00.0000003 Calling New() : MethodName = 'ResolvePackageSources'
Bestätigung Vorgang fortsetzen? [J] Ja [A] Ja, alle [B] Befehl anhalten [H] Anhalten [?] Hilfe (Standard ist "J"): A DEBUG: 00:00:00.0000916 Verbose: True DEBUG: 00:00:00.0001471 Debug: True DEBUG: 00:00:00.0001976 Name: WinSCP DEBUG: 00:00:00.0002470 Source: BaGet DEBUG: 00:00:00.0045981 INVOKING PowerShell Fn Resolve-PackageSource with args that has length 0 DEBUG: 00:00:00.0069716 In PowerShellGet Provider - 'Resolve-PackageSource'. DEBUG: 00:00:00.0133667 Yielding package source for BaGet at location http://baget/v3/index.json DEBUG: 00:00:00.0156878 Done calling powershell «Resolve-PackageSource» «PSModule» DEBUG: 00:00:00.0269482 Calling New() : MethodName = 'GetDynamicOptions' DEBUG: 00:00:00.0270345 Verbose: True DEBUG: 00:00:00.0270881 Debug: True DEBUG: 00:00:00.0271379 Name: WinSCP DEBUG: 00:00:00.0271873 Source: BaGet DEBUG: 00:00:00.0290442 INVOKING PowerShell Fn Get-DynamicOptions with args Provider that has length 1 DEBUG: 00:00:00.0312768 In PowerShellGet Provider - 'Get-DynamicOptions'. DEBUG: 00:00:00.0351374 Done calling powershell «Get-DynamicOptions» «PSModule» DEBUG: 00:00:00.0448541 Calling New() : MethodName = 'GetDynamicOptions' DEBUG: 00:00:00.0449050 Verbose: True DEBUG: 00:00:00.0449377 Debug: True DEBUG: 00:00:00.0449681 Name: WinSCP DEBUG: 00:00:00.0449982 Source: BaGet DEBUG: 00:00:00.0465624 INVOKING PowerShell Fn Get-DynamicOptions with args Source that has length 1 DEBUG: 00:00:00.0483624 In PowerShellGet Provider - 'Get-DynamicOptions'. DEBUG: 00:00:00.0527526 Done calling powershell «Get-DynamicOptions» «PSModule» DEBUG: 00:00:00.0593335 Calling New() : MethodName = 'GetDynamicOptions' DEBUG: 00:00:00.0593848 Verbose: True DEBUG: 00:00:00.0594182 Debug: True DEBUG: 00:00:00.0594494 Name: WinSCP DEBUG: 00:00:00.0594794 Source: BaGet DEBUG: 00:00:00.0607331 INVOKING PowerShell Fn Get-DynamicOptions with args Package that has length 1 DEBUG: 00:00:00.0621567 In PowerShellGet Provider - 'Get-DynamicOptions'. DEBUG: 00:00:00.0818326 Done calling powershell «Get-DynamicOptions» «PSModule» DEBUG: 00:00:01.9644470 Calling New() : MethodName = 'ResolvePackageSources' DEBUG: 00:00:01.9665761 ProviderName: PowerShellGet DEBUG: 00:00:01.9672889 Type: Module DEBUG: 00:00:01.9679724 Source: BaGet DEBUG: 00:00:01.9686357 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString DEBUG: 00:00:01.9693424 Debug: True DEBUG: 00:00:01.9700384 Verbose: True DEBUG: 00:00:01.9713917 Name: WinSCP DEBUG: 00:00:01.9730137 INVOKING PowerShell Fn Resolve-PackageSource with args that has length 0 DEBUG: 00:00:01.9747433 In PowerShellGet Provider - 'Resolve-PackageSource'. AUSFÜHRLICH: Repository details, Name = 'BaGet', Location = 'http://baget/v3/index.json'; IsTrusted = 'True'; IsRegistered = 'True'. DEBUG: 00:00:01.9782391 Yielding package source for BaGet at location http://baget/v3/index.json DEBUG: 00:00:01.9802127 Done calling powershell «Resolve-PackageSource» «PSModule» DEBUG: 00:00:01.9849101 Calling SearchForPackages. Name='WinSCP' AUSFÜHRLICH: Using the provider 'PowerShellGet' for searching packages. DEBUG: 00:00:02.0086773 PackageProvider::FindPackage with name WinSCP DEBUG: 00:00:02.0102857 Calling SearchForPackages After Select 1 DEBUG: 00:00:02.0290241 Calling New() : MethodName = 'FindPackage' DEBUG: 00:00:02.0298539 ProviderName: PowerShellGet DEBUG: 00:00:02.0305100 Type: Module DEBUG: 00:00:02.0311221 Source: BaGet DEBUG: 00:00:02.0317839 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString DEBUG: 00:00:02.0324255 Debug: True DEBUG: 00:00:02.0330129 Verbose: True DEBUG: 00:00:02.0336253 Name: WinSCP DEBUG: 00:00:02.0351671 INVOKING PowerShell Fn Find-Package with args System.String[], , , that has length 4 DEBUG: 00:00:02.1547225 In PowerShellGet Provider - 'Find-Package'. DEBUG: 00:00:02.1568410 OPTION: ProviderName => PowerShellGet DEBUG: 00:00:02.1577164 OPTION: Type => Module DEBUG: 00:00:02.1584334 OPTION: Source => BaGet DEBUG: 00:00:02.1591465 OPTION: MessageResolver => Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString DEBUG: 00:00:02.1599132 OPTION: Debug => True DEBUG: 00:00:02.1606686 OPTION: Verbose => True DEBUG: 00:00:02.1615045 OPTION: Name => WinSCP AUSFÜHRLICH: Using the specified source names : 'BaGet'. AUSFÜHRLICH: Getting the provider object for the PackageManagement Provider 'NuGet'. AUSFÜHRLICH: The specified Location is 'http://baget/v3/index.json' and PackageManagementProvider is 'NuGet'. DEBUG: 00:00:02.2311272 PackageProvider::FindPackage with name WinSCP DEBUG: 00:00:02.2400752 Calling 'NuGet'::'FindPackage' - name='WinSCP', requiredVersion='',minimumVersion='', maximumVersion='''. DEBUG: 00:00:02.2439085 Iterating 'WinSCP'. DEBUG: 00:00:02.3475909 Calling 'NuGetRequest'::'RegisteredPackageSources', 'C:\Users\wkiv924\AppData\Roaming\NuGet\nuget.config'. DEBUG: 00:00:02.3493418 Loading a configuration from file 'C:\Users\wkiv924\AppData\Roaming\NuGet\nuget.config'. DEBUG: 00:00:02.3515489 Loaded a configuration from file 'C:\Users\wkiv924\AppData\Roaming\NuGet\nuget.config'. DEBUG: 00:00:02.3562436 There are '1' registered sources in 'NuGet' provider. DEBUG: 00:00:02.3580576 Source 'http://baget/v3/index.json' is not one of the registered sources in 'NuGet' provider. DEBUG: 00:00:03.3810170 Downloading 'http://baget/v3/index.json'. DEBUG: 00:00:03.3920269 Completed downloading 'http://baget/v3/index.json'. DEBUG: 00:00:03.5428914 Calling 'NuGetResourceCollection3'::'Make', 'http://baget/v3/index.json'. DEBUG: 00:00:03.5729796 Discovered service type 'Query': 'http://localhost:5000/v3/search' DEBUG: 00:00:03.5761826 Discovered service type 'Query': 'http://localhost:5000/v3/search' DEBUG: 00:00:03.5774629 Discovered service type 'Query': 'http://localhost:5000/v3/search' DEBUG: 00:00:03.5785136 Discovered service type 'Registrations': 'http://localhost:5000/v3/registration/' DEBUG: 00:00:03.5795153 Discovered service type 'Registrations': 'http://localhost:5000/v3/registration/' DEBUG: 00:00:03.5810434 Discovered service type 'Files': 'http://localhost:5000/v3/package/' DEBUG: 00:00:03.5820949 Discovered service type 'AutoComplete': 'http://localhost:5000/v3/autocomplete' DEBUG: 00:00:03.5839051 Discovered service type 'AutoComplete': 'http://localhost:5000/v3/autocomplete' DEBUG: 00:00:03.5849520 Returning the call 'NuGetResourceCollection3'::'Make'. AUSFÜHRLICH: Fehler beim Senden der Anforderung. DEBUG: 00:00:05.6128505 AUSFÜHRLICH: Retry downloading 'http://localhost:5000/v3/search' for '2' more times AUSFÜHRLICH: Fehler beim Senden der Anforderung. DEBUG: 00:00:07.6802817 AUSFÜHRLICH: Retry downloading 'http://localhost:5000/v3/search' for '1' more times AUSFÜHRLICH: Fehler beim Senden der Anforderung. DEBUG: 00:00:09.6958087 AUSFÜHRLICH: Retry downloading 'http://localhost:5000/v3/search' for '0' more times WARNUNG: Unable to resolve package source 'http://baget/v3/index.json'.
Bestätigung Vorgang fortsetzen? [J] Ja [A] Ja, alle [B] Befehl anhalten [H] Anhalten [?] Hilfe (Standard ist "J"): A AUSFÜHRLICH: Total package yield:'0' for the specified package 'WinSCP'. DEBUG: 00:00:11.8214189 Completed iterating for 'WinSCP'. DEBUG: 00:00:11.8223769 PowerShell Script 'PSModule' Function 'Find-Package' returns null. DEBUG: 00:00:11.8234835 Done calling powershell «Find-Package» «PSModule» DEBUG: 00:00:11.8296675 unmatched package name='WinSCP'
Bestätigung No match was found for the specified search criteria and module name 'WinSCP'. Try Get-PSRepository to see all available registered module repositories. [J] Ja [A] Ja, alle [B] Befehl anhalten [H] Anhalten [?] Hilfe (Standard ist "J"): A PackageManagement\Find-Package : No match was found for the specified search criteria and module name 'WinSCP'. Try Get-PSRepository to see all available registered module repositories. In C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.0.4\PSModule.psm1:8665 Zeichen:9
PackageManagement\Find-Package @PSBoundParameters | Microsoft ...
+ CategoryInfo : ObjectNotFound: (Microsoft.Power...ets.FindPackage:FindPackage) [Find-Package], Exceptio
n
+ FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.FindPackage
```
Output of secont try in the same session
λ Find-Module -Name 'WinSCP' -Repository 'BaGet' -Verbose -debug
DEBUG: 00:00:00.0000003 Calling New() : MethodName = 'ResolvePackageSources'
Bestätigung Vorgang fortsetzen? [J] Ja [A] Ja, alle [B] Befehl anhalten [H] Anhalten [?] Hilfe (Standard ist "J"): A DEBUG: 00:00:00.0000897 Verbose: False DEBUG: 00:00:00.0001467 Name: BaGet DEBUG: 00:00:00.0001988 ErrorVariable: ev DEBUG: 00:00:00.0042822 INVOKING PowerShell Fn Resolve-PackageSource with args that has length 0 DEBUG: 00:00:00.0071286 In PowerShellGet Provider - 'Resolve-PackageSource'. DEBUG: 00:00:00.0341742 Yielding package source for BaGet at location http://baget/v3/index.json DEBUG: 00:00:00.0358350 Done calling powershell «Resolve-PackageSource» «PSModule» DEBUG: 00:00:00.0433993 Calling New() : MethodName = 'GetDynamicOptions' DEBUG: 00:00:00.0434457 Verbose: False DEBUG: 00:00:00.0434746 Name: BaGet DEBUG: 00:00:00.0435076 ErrorVariable: ev DEBUG: 00:00:00.0446119 INVOKING PowerShell Fn Get-DynamicOptions with args Provider that has length 1 DEBUG: 00:00:00.0459633 In PowerShellGet Provider - 'Get-DynamicOptions'. DEBUG: 00:00:00.0478579 Done calling powershell «Get-DynamicOptions» «PSModule» DEBUG: 00:00:00.0537500 Calling New() : MethodName = 'GetDynamicOptions' DEBUG: 00:00:00.0537964 Verbose: False DEBUG: 00:00:00.0538249 Name: BaGet DEBUG: 00:00:00.0538527 ErrorVariable: ev DEBUG: 00:00:00.0552048 INVOKING PowerShell Fn Get-DynamicOptions with args Source that has length 1 DEBUG: 00:00:00.0566273 In PowerShellGet Provider - 'Get-DynamicOptions'. DEBUG: 00:00:00.0604845 Done calling powershell «Get-DynamicOptions» «PSModule» DEBUG: 00:00:02.3562671 Calling New() : MethodName = 'ResolvePackageSources' DEBUG: 00:00:02.3576915 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString DEBUG: 00:00:02.3587947 ProviderName: PowerShellGet DEBUG: 00:00:02.3602753 Verbose: False DEBUG: 00:00:02.3609094 Name: BaGet DEBUG: 00:00:02.3615875 ErrorVariable: ev DEBUG: 00:00:02.3626074 INVOKING PowerShell Fn Resolve-PackageSource with args that has length 0 DEBUG: 00:00:02.3642010 In PowerShellGet Provider - 'Resolve-PackageSource'. DEBUG: 00:00:02.3673766 Yielding package source for BaGet at location http://baget/v3/index.json DEBUG: 00:00:02.3686193 Done calling powershell «Resolve-PackageSource» «PSModule» DEBUG: 00:00:02.3735618 Calling New() : MethodName = 'ResolvePackageSources' DEBUG: 00:00:02.3746779 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString DEBUG: 00:00:02.3761988 ProviderName: PowerShellGet DEBUG: 00:00:02.3777266 Verbose: False DEBUG: 00:00:02.3795794 Name: BaGet DEBUG: 00:00:02.3806338 ErrorVariable: ev DEBUG: 00:00:02.3817587 INVOKING PowerShell Fn Resolve-PackageSource with args that has length 0 DEBUG: 00:00:02.3829401 In PowerShellGet Provider - 'Resolve-PackageSource'. DEBUG: 00:00:02.3862184 Yielding package source for BaGet at location http://baget/v3/index.json DEBUG: 00:00:02.3883677 Done calling powershell «Resolve-PackageSource» «PSModule» DEBUG: 00:00:00 Calling New() : MethodName = 'ResolvePackageSources'
Bestätigung Vorgang fortsetzen? [J] Ja [A] Ja, alle [B] Befehl anhalten [H] Anhalten [?] Hilfe (Standard ist "J"): A DEBUG: 00:00:00.0000851 Verbose: True DEBUG: 00:00:00.0001417 Debug: True DEBUG: 00:00:00.0001923 Name: WinSCP DEBUG: 00:00:00.0002413 Source: BaGet DEBUG: 00:00:00.0020713 INVOKING PowerShell Fn Resolve-PackageSource with args that has length 0 DEBUG: 00:00:00.0048668 In PowerShellGet Provider - 'Resolve-PackageSource'. DEBUG: 00:00:00.0130409 Yielding package source for BaGet at location http://baget/v3/index.json DEBUG: 00:00:00.0165332 Done calling powershell «Resolve-PackageSource» «PSModule» DEBUG: 00:00:00.0317664 Calling New() : MethodName = 'GetDynamicOptions' DEBUG: 00:00:00.0318941 Verbose: True DEBUG: 00:00:00.0319215 Debug: True DEBUG: 00:00:00.0319432 Name: WinSCP DEBUG: 00:00:00.0319625 Source: BaGet DEBUG: 00:00:00.0332539 INVOKING PowerShell Fn Get-DynamicOptions with args Provider that has length 1 DEBUG: 00:00:00.0345665 In PowerShellGet Provider - 'Get-DynamicOptions'. DEBUG: 00:00:00.0370290 Done calling powershell «Get-DynamicOptions» «PSModule» DEBUG: 00:00:00.0427497 Calling New() : MethodName = 'GetDynamicOptions' DEBUG: 00:00:00.0428177 Verbose: True DEBUG: 00:00:00.0428671 Debug: True DEBUG: 00:00:00.0429131 Name: WinSCP DEBUG: 00:00:00.0429564 Source: BaGet DEBUG: 00:00:00.0444960 INVOKING PowerShell Fn Get-DynamicOptions with args Source that has length 1 DEBUG: 00:00:00.0462610 In PowerShellGet Provider - 'Get-DynamicOptions'. DEBUG: 00:00:00.0506246 Done calling powershell «Get-DynamicOptions» «PSModule» DEBUG: 00:00:00.0622890 Calling New() : MethodName = 'GetDynamicOptions' DEBUG: 00:00:00.0623316 Verbose: True DEBUG: 00:00:00.0623635 Debug: True DEBUG: 00:00:00.0623943 Name: WinSCP DEBUG: 00:00:00.0624240 Source: BaGet DEBUG: 00:00:00.0633257 INVOKING PowerShell Fn Get-DynamicOptions with args Package that has length 1 DEBUG: 00:00:00.0642308 In PowerShellGet Provider - 'Get-DynamicOptions'. DEBUG: 00:00:00.0713051 Done calling powershell «Get-DynamicOptions» «PSModule» DEBUG: 00:00:01.6336459 Calling New() : MethodName = 'ResolvePackageSources' DEBUG: 00:00:01.6351546 ProviderName: PowerShellGet DEBUG: 00:00:01.6364102 Type: Module DEBUG: 00:00:01.6371583 Source: BaGet DEBUG: 00:00:01.6380596 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString DEBUG: 00:00:01.6407806 Debug: True DEBUG: 00:00:01.6423016 Verbose: True DEBUG: 00:00:01.6441137 Name: WinSCP DEBUG: 00:00:01.6456084 INVOKING PowerShell Fn Resolve-PackageSource with args that has length 0 DEBUG: 00:00:01.6470118 In PowerShellGet Provider - 'Resolve-PackageSource'. AUSFÜHRLICH: Repository details, Name = 'BaGet', Location = 'http://baget/v3/index.json'; IsTrusted = 'True'; IsRegistered = 'True'. DEBUG: 00:00:01.6506147 Yielding package source for BaGet at location http://baget/v3/index.json DEBUG: 00:00:01.6520566 Done calling powershell «Resolve-PackageSource» «PSModule» DEBUG: 00:00:01.6522109 Calling SearchForPackages. Name='WinSCP' AUSFÜHRLICH: Using the provider 'PowerShellGet' for searching packages. DEBUG: 00:00:01.6534194 PackageProvider::FindPackage with name WinSCP DEBUG: 00:00:01.6539223 Calling SearchForPackages After Select 1 DEBUG: 00:00:01.6588816 Calling New() : MethodName = 'FindPackage' DEBUG: 00:00:01.6598912 ProviderName: PowerShellGet DEBUG: 00:00:01.6626422 Type: Module DEBUG: 00:00:01.6638382 Source: BaGet DEBUG: 00:00:01.6649189 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString DEBUG: 00:00:01.6655541 Debug: True DEBUG: 00:00:01.6673810 Verbose: True DEBUG: 00:00:01.6681717 Name: WinSCP DEBUG: 00:00:01.6694680 INVOKING PowerShell Fn Find-Package with args System.String[], , , that has length 4 DEBUG: 00:00:01.6713040 In PowerShellGet Provider - 'Find-Package'. DEBUG: 00:00:01.6719126 OPTION: ProviderName => PowerShellGet DEBUG: 00:00:01.6726851 OPTION: Type => Module DEBUG: 00:00:01.6737148 OPTION: Source => BaGet DEBUG: 00:00:01.6744553 OPTION: MessageResolver => Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString DEBUG: 00:00:01.6751677 OPTION: Debug => True DEBUG: 00:00:01.6758816 OPTION: Verbose => True DEBUG: 00:00:01.6768361 OPTION: Name => WinSCP AUSFÜHRLICH: Using the specified source names : 'BaGet'. AUSFÜHRLICH: Getting the provider object for the PackageManagement Provider 'NuGet'. AUSFÜHRLICH: The specified Location is 'http://baget/v3/index.json' and PackageManagementProvider is 'NuGet'. DEBUG: 00:00:01.6958828 PackageProvider::FindPackage with name WinSCP DEBUG: 00:00:01.7015518 Calling 'NuGet'::'FindPackage' - name='WinSCP', requiredVersion='',minimumVersion='', maximumVersion='''. DEBUG: 00:00:01.7027606 Iterating 'WinSCP'. DEBUG: 00:00:01.7050472 There are '1' registered sources in 'NuGet' provider. DEBUG: 00:00:01.7073694 Source 'http://baget/v3/index.json' is not one of the registered sources in 'NuGet' provider. WARNUNG: Unable to resolve package source 'http://baget/v3/index.json'.
Bestätigung Vorgang fortsetzen? [J] Ja [A] Ja, alle [B] Befehl anhalten [H] Anhalten [?] Hilfe (Standard ist "J"): A AUSFÜHRLICH: Total package yield:'0' for the specified package 'WinSCP'. DEBUG: 00:00:03.0072282 Completed iterating for 'WinSCP'. DEBUG: 00:00:03.0082668 PowerShell Script 'PSModule' Function 'Find-Package' returns null. DEBUG: 00:00:03.0096048 Done calling powershell «Find-Package» «PSModule» DEBUG: 00:00:03.0117127 unmatched package name='WinSCP'
Bestätigung No match was found for the specified search criteria and module name 'WinSCP'. Try Get-PSRepository to see all available registered module repositories. [J] Ja [A] Ja, alle [B] Befehl anhalten [H] Anhalten [?] Hilfe (Standard ist "J"): A PackageManagement\Find-Package : No match was found for the specified search criteria and module name 'WinSCP'. Try Get-PSRepository to see all available registered module repositories. In C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.0.4\PSModule.psm1:8665 Zeichen:9
+ CategoryInfo : ObjectNotFound: (Microsoft.Power...ets.FindPackage:FindPackage) [Find-Package], Exceptio
n
+ FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.FindPackage
```
Please ignore the nuget package error downloads. The nugepackage provider is already installed an working with other local repos and powershellgallery.
I'm having similar issues with Find-Module
in PowerShellGet
version 1.6.7, registered repository with:
Register-PSRepository testget -SourceLocation https://[host]/v3/index.json -PublishLocation https://[host]/api/v2/package
Publish-Module
works just fine, but according to the IIS logs Find-Module MyModuleName
sends a GET request for:
https://[host]/v3/index.json/FindPackagesById()?id='MyModuleName'
To which the server responds with some dynamic web page:
<!doctype html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="description" content="BaGet"><meta name="author" content="Loic Sharma"><title>BaGet</title><link href="/static/css/main.9bf9dd7b.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script type="text/javascript" src="/static/js/main.860c9147.js"></script></body></html>
I am not sure that this will help your specific use case, but I was having the same errors trying to use PowerShell 7 against a jFrog artifacrtory. It seemed to work in PS5.1, but errored out in PS7. Hunting a different way, I came across a jFrog how to: https://jfrog.com/knowledge-base/how-to-work-with-powershell-modules-and-a-nuget-repository/, where they reference registering the repository without the /v2/ or /v3/ pathing. This fixed my issues in PS7. Like above, I was able to publish, but could not find or install.
Describe the bug
I'm unable to install from (though I am able to publish to) PowerShell modules using the
Install-Module
PowerShell commandlet in PowerShellGet, which is the recommended way to install PowerShell modules from a NuGet feed.To Reproduce
Steps to reproduce the behavior:
sudo docker run --rm --name baget-server -p 5555:80 --env-file baget.env -v "$(pwd)/baget-data:/var/baget" junkiebev/baget:v1.0.0
' - the baget.env file contains the content currently documented on the websiteFind-Module -Repository baget | select *
Name : Write-ObjectToSQL Version : 1.13.0 Type : Module Description : Writes the properties of an object into a database table. The table will be created if it doesnt exist. Author : John Roos CompanyName : Copyright : PublishedDate : InstalledDate : UpdatedDate : LicenseUri : ProjectUri : https://github.com/JohnRoos/PowerShell/tree/master/Modules/Write-ObjectToSQL IconUri : Tags : {Database,, SQLServer,, Object,, PSModule,} Includes : {Function, RoleCapability, Command, DscResource...} PowerShellGetFormatVersion : ReleaseNotes : Dependencies : {} RepositorySourceLocation : baget Repository : baget PackageManagementProvider : NuGet AdditionalMetadata : @{summary=Writes the properties of an object into a database table. The table will be created if it doesnt exist.; isLatestVersion=False; developmentDependency=False; downloadCount=0; description=Writes the properties of an object into a database table. The table will be created if it doesnt exist.; PackageManagementProvider=NuGet; tags=Database, SQLServer, Object, PSModule, PSIncludes_Cmdlet, PSCmdlet_Write-ObjectToSQL, PSIncludes_Function, PSFunction_Write-ObjectToSQL, PSCommand_Write-ObjectToSQL; isAbsoluteLatestVersion=False; SourceName=baget; requireLicenseAcceptance=False; IsPrerelease=False}
Find-Module -Repository baget -name "Write-ObjectToSQL" -Debug DEBUG: 00:00:00.0000002 Calling New() : MethodName = 'ResolvePackageSources' DEBUG: 00:00:00.0000183 Verbose: False DEBUG: 00:00:00.0000292 Name: baget DEBUG: 00:00:00.0000393 ErrorVariable: ev DEBUG: 00:00:00.0007650 INVOKING PowerShell Fn Resolve-PackageSource with args that has length 0 DEBUG: 00:00:00.0014202 In PowerShellGet Provider - 'Resolve-PackageSource'. DEBUG: 00:00:00.0027318 Yielding package source for baget at location http://chd9fmks1dt.COMPANY.com:5555/v3/index.json DEBUG: 00:00:00.0035762 Done calling powershell «Resolve-PackageSource» «PSModule» DEBUG: 00:00:00.0066347 Calling New() : MethodName = 'GetDynamicOptions' DEBUG: 00:00:00.0066552 Verbose: False DEBUG: 00:00:00.0066694 Name: baget DEBUG: 00:00:00.0066833 ErrorVariable: ev DEBUG: 00:00:00.0073400 INVOKING PowerShell Fn Get-DynamicOptions with args Provider that has length 1 DEBUG: 00:00:00.0080542 In PowerShellGet Provider - 'Get-DynamicOptions'. DEBUG: 00:00:00.0090752 Done calling powershell «Get-DynamicOptions» «PSModule» DEBUG: 00:00:00.0145703 Calling New() : MethodName = 'GetDynamicOptions' DEBUG: 00:00:00.0145883 Verbose: False DEBUG: 00:00:00.0145992 Name: baget DEBUG: 00:00:00.0146101 ErrorVariable: ev DEBUG: 00:00:00.0152726 INVOKING PowerShell Fn Get-DynamicOptions with args Source that has length 1 DEBUG: 00:00:00.0158758 In PowerShellGet Provider - 'Get-DynamicOptions'. DEBUG: 00:00:00.0174636 Done calling powershell «Get-DynamicOptions» «PSModule» DEBUG: 00:00:02.3101001 Calling New() : MethodName = 'ResolvePackageSources' DEBUG: 00:00:02.3114422 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString DEBUG: 00:00:02.3126685 ProviderName: PowerShellGet DEBUG: 00:00:02.3198120 Verbose: False DEBUG: 00:00:02.3210457 Name: baget DEBUG: 00:00:02.3220960 ErrorVariable: ev DEBUG: 00:00:02.3235037 INVOKING PowerShell Fn Resolve-PackageSource with args that has length 0 DEBUG: 00:00:02.3251107 In PowerShellGet Provider - 'Resolve-PackageSource'. DEBUG: 00:00:02.3276147 Yielding package source for baget at location http://chd9fmks1dt.COMPANY.com:5555/v3/index.json DEBUG: 00:00:02.3289420 Done calling powershell «Resolve-PackageSource» «PSModule» DEBUG: 00:00:02.3356718 Calling New() : MethodName = 'ResolvePackageSources' DEBUG: 00:00:02.3367740 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString DEBUG: 00:00:02.3378105 ProviderName: PowerShellGet DEBUG: 00:00:02.3387118 Verbose: False DEBUG: 00:00:02.3393995 Name: baget DEBUG: 00:00:02.3405819 ErrorVariable: ev DEBUG: 00:00:02.3418323 INVOKING PowerShell Fn Resolve-PackageSource with args that has length 0 DEBUG: 00:00:02.3425986 In PowerShellGet Provider - 'Resolve-PackageSource'. DEBUG: 00:00:02.3442806 Yielding package source for baget at location http://chd9fmks1dt.COMPANY.com:5555/v3/index.json DEBUG: 00:00:02.3453762 Done calling powershell «Resolve-PackageSource» «PSModule» DEBUG: 00:00:00.0000001 Calling New() : MethodName = 'ResolvePackageSources' DEBUG: 00:00:00.0000237 Debug: True DEBUG: 00:00:00.0000381 Source: baget DEBUG: 00:00:00.0000508 Name: Write-ObjectToSQL DEBUG: 00:00:00.0008141 INVOKING PowerShell Fn Resolve-PackageSource with args that has length 0 DEBUG: 00:00:00.0015087 In PowerShellGet Provider - 'Resolve-PackageSource'. DEBUG: 00:00:00.0031133 Yielding package source for baget at location http://chd9fmks1dt.COMPANY.com:5555/v3/index.json DEBUG: 00:00:00.0039927 Done calling powershell «Resolve-PackageSource» «PSModule» DEBUG: 00:00:00.0070571 Calling New() : MethodName = 'GetDynamicOptions' DEBUG: 00:00:00.0070779 Debug: True DEBUG: 00:00:00.0070919 Source: baget DEBUG: 00:00:00.0071047 Name: Write-ObjectToSQL DEBUG: 00:00:00.0099547 INVOKING PowerShell Fn Get-DynamicOptions with args Provider that has length 1 DEBUG: 00:00:00.0107296 In PowerShellGet Provider - 'Get-DynamicOptions'. DEBUG: 00:00:00.0118169 Done calling powershell «Get-DynamicOptions» «PSModule» DEBUG: 00:00:00.0148330 Calling New() : MethodName = 'GetDynamicOptions' DEBUG: 00:00:00.0148528 Debug: True DEBUG: 00:00:00.0148665 Source: baget DEBUG: 00:00:00.0148793 Name: Write-ObjectToSQL DEBUG: 00:00:00.0155468 INVOKING PowerShell Fn Get-DynamicOptions with args Source that has length 1 DEBUG: 00:00:00.0162440 In PowerShellGet Provider - 'Get-DynamicOptions'. DEBUG: 00:00:00.0180098 Done calling powershell «Get-DynamicOptions» «PSModule» DEBUG: 00:00:00.0232328 Calling New() : MethodName = 'GetDynamicOptions' DEBUG: 00:00:00.0232557 Debug: True DEBUG: 00:00:00.0232694 Source: baget DEBUG: 00:00:00.0232821 Name: Write-ObjectToSQL DEBUG: 00:00:00.0240991 INVOKING PowerShell Fn Get-DynamicOptions with args Package that has length 1 DEBUG: 00:00:00.0248401 In PowerShellGet Provider - 'Get-DynamicOptions'. DEBUG: 00:00:00.0282863 Done calling powershell «Get-DynamicOptions» «PSModule» DEBUG: 00:00:00.7397806 Calling New() : MethodName = 'ResolvePackageSources' DEBUG: 00:00:00.7408836 ProviderName: PowerShellGet DEBUG: 00:00:00.7423086 Type: Module DEBUG: 00:00:00.7436397 Source: baget DEBUG: 00:00:00.7450176 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString DEBUG: 00:00:00.7480055 Debug: True DEBUG: 00:00:00.7486322 Name: Write-ObjectToSQL DEBUG: 00:00:00.7495547 INVOKING PowerShell Fn Resolve-PackageSource with args that has length 0 DEBUG: 00:00:00.7502774 In PowerShellGet Provider - 'Resolve-PackageSource'. VERBOSE: Repository details, Name = 'baget', Location = 'http://chd9fmks1dt.COMPANY.com:5555/v3/index.json'; IsTrusted = 'True'; IsRegistered = 'True'. DEBUG: 00:00:01.8641825 Yielding package source for baget at location http://chd9fmks1dt.COMPANY.com:5555/v3/index.json DEBUG: 00:00:01.8671617 Done calling powershell «Resolve-PackageSource» «PSModule» DEBUG: 00:00:01.8672944 Calling SearchForPackages. Name='Write-ObjectToSQL' VERBOSE: Using the provider 'PowerShellGet' for searching packages. DEBUG: 00:00:01.8690369 PackageProvider::FindPackage with name Write-ObjectToSQL DEBUG: 00:00:01.8696576 Calling SearchForPackages After Select 1 DEBUG: 00:00:01.8787970 Calling New() : MethodName = 'FindPackage' DEBUG: 00:00:01.8793519 ProviderName: PowerShellGet DEBUG: 00:00:01.8798899 Type: Module DEBUG: 00:00:01.8804651 Source: baget DEBUG: 00:00:01.8810067 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString DEBUG: 00:00:01.8815496 Debug: True DEBUG: 00:00:01.8820819 Name: Write-ObjectToSQL DEBUG: 00:00:01.8913914 INVOKING PowerShell Fn Find-Package with args System.String[], , , that has length 4 DEBUG: 00:00:01.8927613 In PowerShellGet Provider - 'Find-Package'. DEBUG: 00:00:01.8940210 OPTION: ProviderName => PowerShellGet DEBUG: 00:00:01.8955056 OPTION: Type => Module DEBUG: 00:00:01.8970041 OPTION: Source => baget DEBUG: 00:00:01.8993245 OPTION: MessageResolver => Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString DEBUG: 00:00:01.9001381 OPTION: Debug => True DEBUG: 00:00:01.9008272 OPTION: Name => Write-ObjectToSQL VERBOSE: Using the specified source names : 'baget'. VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'. VERBOSE: The specified Location is 'http://chd9fmks1dt.COMPANY.com:5555/v3/index.json' and PackageManagementProvider is 'NuGet'. DEBUG: 00:00:01.9069217 PackageProvider::FindPackage with name Write-ObjectToSQL DEBUG: 00:00:01.9093828 Calling 'NuGet'::'FindPackage' - name='Write-ObjectToSQL', requiredVersion='',minimumVersion='', maximumVersion='''. DEBUG: 00:00:01.9106513 Iterating 'Write-ObjectToSQL'. DEBUG: 00:00:01.9117811 There are '7' registered sources in 'NuGet' provider. DEBUG: 00:00:01.9123819 Source 'http://chd9fmks1dt.COMPANY.com:5555/v3/index.json' is not one of the registered sources in 'NuGet' provider. DEBUG: 00:00:01.9129773 Source 'http://chd9fmks1dt.COMPANY.com:5555/v3/index.json' is validated. DEBUG: 00:00:01.9144181 Calling 'NuGetRequest'::'GetPackageById', 'Write-ObjectToSQL'. DEBUG: 00:00:01.9173521 Calling 'NuGetPackageRepository'::'FindPackagesById', 'Write-ObjectToSQL'. DEBUG: 00:00:01.9192746 Calling 'NuGetPackageFeed3'::'Find', 'Write-ObjectToSQL'. DEBUG: 00:00:01.9236241 Calling 'NuGetPackageFeed3'::'FindImpl', 'Write-ObjectToSQL'. DEBUG: 00:00:01.9250263 Returning the call 'NuGetPackageFeed3'::'FindImpl'. DEBUG: 00:00:01.9263363 Returning the call 'NuGetPackageFeed3'::'Find'. DEBUG: 00:00:01.9274801 Calling 'NuGetPackageFeed3'::'Find', 'http://chd9fmks1dt.COMPANY.com:5555/v3/registration/write-objecttosql/index.json'. DEBUG: 00:00:01.9283043 Downloading 'http://chd9fmks1dt.COMPANY.com:5555/v3/registration/write-objecttosql/index.json'. DEBUG: 00:00:02.0650665 Completed downloading 'http://chd9fmks1dt.COMPANY.com:5555/v3/registration/write-objecttosql/index.json'. WARNING: An internal error occurred: The JSON object returned by the NuGet API does not match expected schema. Expected property: 'type'. Check the debug stream for the ful l JSON object dump. DEBUG: 00:00:07.0706095 System.NullReferenceException: Object reference not set to an instance of an object. at System.Object.GetType() at Microsoft.PackageManagement.NuGetProvider.DynamicJsonParser.FlattenObject(Object o, String numericalPrefix, Int32 currentFlattenDepth, Int32& maxFlattenDepth) at Microsoft.PackageManagement.NuGetProvider.DynamicJsonParser.FlattenDynamic(Object obj, String numericalPrefix, Int32 currentFlattenDepth, Int32& maxFlattenDepth) at Microsoft.PackageManagement.NuGetProvider.DynamicJsonParser.FlattenObject(Object o, String numericalPrefix, Int32 currentFlattenDepth, Int32& maxFlattenDepth) at Microsoft.PackageManagement.NuGetProvider.DynamicJsonParser.FlattenDynamic(Object obj, String numericalPrefix, Int32 currentFlattenDepth, Int32& maxFlattenDepth) at Microsoft.PackageManagement.NuGetProvider.DynamicJsonParser.FlattenObject(Object o, String numericalPrefix, Int32 currentFlattenDepth, Int32& maxFlattenDepth) at Microsoft.PackageManagement.NuGetProvider.DynamicJsonParser.FlattenObject(Object o, String numericalPrefix, Int32 currentFlattenDepth, Int32& maxFlattenDepth) at Microsoft.PackageManagement.NuGetProvider.DynamicJsonParser.FlattenDynamic(Object obj, String numericalPrefix, Int32 currentFlattenDepth, Int32& maxFlattenDepth) at Microsoft.PackageManagement.NuGetProvider.DynamicJsonParser.FlattenObject(Object o, String numericalPrefix, Int32 currentFlattenDepth, Int32& maxFlattenDepth) at Microsoft.PackageManagement.NuGetProvider.DynamicJsonParser.FlattenObject(Object o, String numericalPrefix, Int32 currentFlattenDepth, Int32& maxFlattenDepth) at Microsoft.PackageManagement.NuGetProvider.DynamicJsonParser.FlattenDynamic(Object obj, String numericalPrefix, Int32 currentFlattenDepth, Int32& maxFlattenDepth) at Microsoft.PackageManagement.NuGetProvider.DynamicJsonParser.Serialize(Object obj, String numericalPrefix) at Microsoft.PackageManagement.NuGetProvider.NuGetPackageFeed3.Find(String registrationUrl, NuGetSearchContext context, RequestWrapper request, Boolean finalAttempt) at Microsoft.PackageManagement.NuGetProvider.NuGetPackageFeed3.d__6.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator
1.MoveNext() at System.Linq.Enumerable.Any[TSource](IEnumerable
1 source) at Microsoft.PackageManagement.NuGetProvider.NuGetRequest.GetPackageById(PackageSource source, String name, NuGetRequest request, String requiredVersion, String minimumV ersion, String maximumVersion, Boolean minInclusive, Boolean maxInclusive, Boolean isDependency) VERBOSE: Total package yield:'0' for the specified package 'Write-ObjectToSQL'. DEBUG: 00:00:07.0708165 Completed iterating for 'Write-ObjectToSQL'. DEBUG: 00:00:07.0710982 PowerShell Script 'PSModule' Function 'Find-Package' returns null. DEBUG: 00:00:07.0718265 Done calling powershell «Find-Package» «PSModule» DEBUG: 00:00:09.8244323 unmatched package name='Write-ObjectToSQL' PackageManagement\Find-Package : No match was found for the specified search criteria and package name 'Write-ObjectToSQL'. Try Get-PackageSource to see all available registered package sources. At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.0.4\PSModule.psm1:8665 char:9type
/v2/api
- no dicev2
api support - same errorsNote that this could be several things
baget
baget
not publishing the type property/not handling the publishing of PS Modules correctly.type
, though expected, isn't generated by the v3 specmissing type property
Expected behavior
The module is published in the correct format and installs correctly from the
baget
NuGet FeedScreenshots
If applicable, add screenshots to help explain your problem.
Additional context
Is anyone using baget to serve PowerShell modules? Is there another Docker image which I should be using for this? If so, which would you recommend?
UI Screenshot
I've been bashing my head against this for two days, so thank you so much for any suggestions you might have.