Closed arnydo closed 5 years ago
Hi,
Thanks for creating the issue.
From the very brief log you provided, there seems to be a wrong endpoint that your nuget client is using. The HTTP PUT
should go to /api/v2/package
as in https://github.com/ai-traders/liget/blob/master/src/LiGet/CarterModules/PackagePublishModule.cs#L39 . But your log suggests there was a put at /api/v3/index.json/
which is just wrong.
It would be nice if you provided more information on how to reproduce the bug. Specifically:
PS: I am leaving on vacation tomorrow so I won't be able to look at this right away.
I am using PowerShell. Registered the Repo with:
Register-PSRepository -Name "TestLiget" -SourceLocation "http://localhost:9011/api/v3/index.json" -PublishLocation "http://localhost:9011/api/v3/index.json" -InstallationPolicy "Trusted"
Attempt to publish PowerShell Module with:
❯ publish-module -Name PS-CoolModule -Repository TestLiget -NuGetApiKey $apikey -Verbose
VERBOSE: Repository details, Name = 'TestLiget', Location = 'http://localhost:9011/api/v3/index.json'; IsTrusted = 'True'; IsRegistered = 'True'.
VERBOSE: Repository details, Name = 'TestLiget', Location = 'http://localhost:9011/api/v3/index.json'; IsTrusted = 'True'; IsRegistered = 'True'.
VERBOSE: Publish Location:'http://localhost:9011/api/v3/index.json'.
VERBOSE: Module 'PS-CoolModule' was found in 'C:\Users\Me\Documents\WindowsPowerShell\Modules\PS-CoolModule'.
VERBOSE: Loading module from path 'C:\Users\Me\AppData\Local\Temp\337057159\PS-CoolModule\PS-CoolModule.psm1'.
VERBOSE: Repository details, Name = 'TestLiget', Location = 'http://localhost:9011/api/v3/index.json'; IsTrusted = 'True'; IsRegistered = 'True'.
VERBOSE: Using the provider 'PowerShellGet' for searching packages.
VERBOSE: Using the specified source names : 'TestLiget'.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'http://localhost:9011/api/v3/index.json' and PackageManagementProvider is 'NuGet'.
VERBOSE: Retry downloading 'http://localhost:9011/api/v3/index.json/FindPackagesById()?id='FoooBarr'' for '2' more times
VERBOSE: Retry downloading 'http://localhost:9011/api/v3/index.json/FindPackagesById()?id='FoooBarr'' for '1' more times
VERBOSE: Retry downloading 'http://localhost:9011/api/v3/index.json/FindPackagesById()?id='FoooBarr'' for '0' more times
VERBOSE: Total package yield:'0' for the specified package 'PS-CoolModule'.
VERBOSE: Performing the operation "Publish-Module" on target "Version '1.0' of module 'PS-CoolModule'".
Publish-PSArtifactUtility : Failed to publish module 'PS-CoolModule': 'Failed to process request. 'Method Not Allowed'.
Can you try with:
Register-PSRepository -Name "TestLiget" -SourceLocation "http://localhost:9011/api/v3/index.json" -PublishLocation "http://localhost:9011/api/v2/package" -InstallationPolicy "Trusted"
That did the trick. I appreciate the assistance!
Hello, attempting to publish Powershell modules to Liget but receive a "405 - Method Not Allowed" error.
Has anyone else experienced this?
This is a fresh, unaltered Docker deployment of Liget..