-
Notifications
You must be signed in to change notification settings - Fork 100
Closed
Labels
Milestone
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
Steps to reproduce
I just tried publishing a module to our MyGet Repository like normal Publish-PSResource -Path <path> -ApiKey <apikey> -Repository MyGetRepo -Verbose
It spits out some verbose output and successfully publishes the package as it should, but spits out
Publish-PSResource : Access to the path 'pack-d3e381d11619a1adddda03baa0a25bf84f875077.idx' is denied.
At line:1 char:1
+ Publish-PSResource -Path <path> -ApiKey <apikey> ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Publish-PSResource], UnauthorizedAccessException
+ FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.PowerShellGet.Cmdlets.PublishPSResource
I have double-checked in my filesystem as well as with our sys admin that I do have the correct permissions applied, but it's still having issues.
Just for extra verbosity on my part here is the verbose output from running the command
VERBOSE: Performing the operation "Publish-PSResource" on target "Publish resource 'C:\GitHub\<modulename>' from the machine.".
VERBOSE: Creating new nuspec file.
VERBOSE: The newly created nuspec is: C:\Users\<me>\AppData\Local\Temp\de27e325-239e-4383-b343-1e76f76b0823\<modulename>.nuspec
VERBOSE: Successfully packed the resource into a .nupkg
VERBOSE: Successfully published the resource to <url>
VERBOSE: Deleting temporary directory 'C:\Users\<me>\AppData\Local\Temp\de27e325-239e-4383-b343-1e76f76b0823'
Publish-PSResource : Access to the path 'pack-d3e381d11619a1adddda03baa0a25bf84f875077.idx' is denied.
At line:1 char:1
+ Publish-PSResource -Path <path> -ApiKey <apikey> ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Publish-PSResource], UnauthorizedAccessException
+ FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.PowerShellGet.Cmdlets.PublishPSResource
Expected behavior
I expect that it will delete the entire \Temp\<guid> directory and all if its contents.
Actual behavior
It fails to delete `\Temp\<guid>\.git\objects\pack\pack-d3e381d11619a1adddda03baa0a25bf84f875077.idx` and `\Temp\<guid>\.git\objects\pack\pack-d3e381d11619a1adddda03baa0a25bf84f875077.pack`.
Error details
Publish-PSResource : Access to the path 'pack-d3e381d11619a1adddda03baa0a25bf84f875077.idx' is denied.
At line:1 char:1
+ Publish-PSResource -Path C:\GitHub\PowershellModuleUpdater -ApiKey '8 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Publish-PSResource], UnauthorizedAccessException
+ FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.PowerShellGet.Cmdlets.PublishPSResource
Environment data
Version Name ExportedCommands
---------- ------- ---- ----------------
Binary 3.0.11 powershellget {Find-PSResource, Get-InstalledPSResource, Get-PSResourceRepository, Install-PSResource...}
Script 2.2.5 PowerShellGet {Find-Command, Find-DscResource, Find-Module, Find-RoleCapability...}
Key : PSVersion
Value : 5.1.22000.282
Name : PSVersion
Key : CLRVersion
Value : 4.0.30319.42000
Name : CLRVersion
Key : WSManStackVersion
Value : 3.0
Name : WSManStackVersion
Key : PSRemotingProtocolVersion
Value : 2.3
Name : PSRemotingProtocolVersion
Key : SerializationVersion
Value : 1.1.0.1
Name : SerializationVersion
Visuals
No response