我有要发布到Powershell画廊的PS脚本。在尝试命令时,出现以下错误。不知道从这里检查什么。有任何线索吗?
Command:
Publish-Script -Path .\NameOfScript.ps1 -NuGetApiKey 'key' -Verbose
Log:
VERBOSE: Performing the operation "Publish-Script" on target "Version '1.0.0' of script 'NameOfScript'".
Publish-PSArtifactUtility : Failed to publish script 'NameOfScript': 'The underlying connection was closed: An unexpected error occurred on a send.
'.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:2875 char:17
+ ... Publish-PSArtifactUtility -PSScriptInfo $PSScriptInfo `
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : FailedToPublishTheScript,Publish-PSArtifactUtility
答案 0 :(得分:0)
这似乎是断断续续的!重新启动PS Session后工作。