Description
I'm trying to publish my first Module with Publish-Module to the gallery., and am getting a 403 response:
Write-Error: C:\program files\powershell\7\Modules\PowerShellGet\PSModule.psm1:10946
Line |
10946 | … Publish-PSArtifactUtility @PublishPSArtifactUtility_Param …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Failed to publish module 'Krayola': 'nuget.exe failed to push Response status code does not indicate success: 403 (The specified API key is invalid, has expired, or does not have
| permission to access the specified package.). '.
My locally defined repository is to PowerShellGallery:
PS C:\Users\Plastikfan\dev\github\ps\Krayola> Get-PSRepository
Name InstallationPolicy SourceLocation
PSGallery Untrusted https://www.powershellgallery.com/api/v2
I've just created the key in my account, it has a name: PlastikfanKey, do I have to link this with the Publish command somehow. There is not enough information for me to fix this. Please can you assist.
What am I getting wrong?
I've been working from this documentation: https://docs.microsoft.com/en-us/powershell/module/powershellget/publish-module?view=powershell-7
Actually, when I specify the name of the module, "Krayola", does this need to be preceded by my username, ie Plastikfan.Krayola?