windows - 访问路径 'C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\Windows\INetCache\Content.IE5'被拒绝

标签 windows azure powershell devops

我正在尝试通过 PowerShell Admin 执行 azure cli 命令来发布:

 az artifacts universal publish --organization https://dev.azure.com/<ORG NAME> --feed <FEED NAME> --name <ARTIFACT NAME> --version 1.0.0 --description "Add description" --path .

这是错误:

    az : Encountered an unexpected error.
At line:1 char:1
+ az artifacts universal publish --organization https://dev.azure.com/s ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Encountered an unexpected error.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
System.UnauthorizedAccessException: Access to the path 
'C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\Windows\INetCache\Content.IE5' is denied.
   at System.IO.Enumeration.FileSystemEnumerator`1.CreateRelativeDirectoryHandle(ReadOnlySpan`1 
relativePath, String fullPath)
   at System.IO.Enumeration.FileSystemEnumerator`1.MoveNext()
   at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
   at System.Collections.Generic.HashSet`1.UnionWith(IEnumerable`1 other)
   at System.Collections.Generic.HashSet`1..ctor(IEnumerable`1 collection, IEqualityComparer`1 comparer)
   at Microsoft.VisualStudio.Services.BlobStore.Common.GlobFactory.Init(String sourceDirectory)
   at Microsoft.VisualStudio.Services.BlobStore.Common.GlobFactory.PerformGlobbing(String sourceDirectory)
   at Microsoft.VisualStudio.Services.BlobStore.Common.PrecomputedHashesGenerator.GetSegmentedPagesFromSource
Directory(String sourceDirectory, Boolean includeEmptyDirectories, ArtifactPublishOptions 
artifactPublishOptions)+MoveNext()
   at Microsoft.VisualStudio.Services.Content.Common.TargetBlockExtensions.PostAllToUnboundedAndCompleteAsync
[T](ITargetBlock`1 targetBlock, IEnumerable`1 inputs, CancellationToken cancellationToken)
   at 
Microsoft.VisualStudio.Services.BlobStore.Common.PrecomputedHashesGenerator.PaginateAndProcessFiles(String 
sourceDirectory, Boolean chunkDedup, IEnumerable`1 pages, CancellationToken cancellationToken, Action`1 
hashCompleteCallback)
   at Microsoft.VisualStudio.Services.BlobStore.WebApi.DedupManifestArtifactClient.PublishAsync(String 
fullPath, ArtifactPublishOptions artifactPublishOptions, String manifestFileOutputPath, CancellationToken 
cancellationToken)
   at Microsoft.VisualStudio.Services.Packaging.UPackClientShared.UPackSharedClient.PushWithoutCheckingForDup
licatePackageAsync(String projectNameOrId, String feedNameOrId, String packageName, String packageVersion, 
String description, String sourceDirectory, Boolean honorIgnoreOptions, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.Packaging.UPackClientShared.UPackSharedClient.PushAsync(String 
projectNameOrId, String feedNameOrId, String packageName, String packageVersion, String description, String 
sourceDirectory, Boolean honorIgnoreOptions, CancellationToken cancellationToken)
   at ArtifactTool.Commands.UPackPublishCommand.<>c__DisplayClass25_0.<<ExecuteAsync>b__0>d.MoveNext() in 
D:\a\1\s\src\ArtifactTool\Commands\UPack\UPackPublishCommand.cs:line 59
--- End of stack trace from previous location where exception was thrown ---
   at ArtifactTool.Commands.UPack.UPackExceptionMapper.WithExceptionHandlingAsync(Func`1 act) in 
D:\a\1\s\src\ArtifactTool\Commands\UPack\UPackExceptionMapper.cs:line 39
   at ArtifactTool.Commands.UPackPublishCommand.ExecuteAsync() in 
D:\a\1\s\src\ArtifactTool\Commands\UPack\UPackPublishCommand.cs:line 63
   at ArtifactTool.Commands.CommandBase.OnExecuteAsync() in 
D:\a\1\s\src\ArtifactTool\Commands\CommandBase.cs:line 105
   at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.InvokeAsync(MethodInfo 
method, Object instance, Object[] arguments) in 
C:\projects\commandlineutils\src\CommandLineUtils\Conventions\ExecuteMethodConvention.cs:line 77
   at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.OnExecute(ConventionContext 
context) in C:\projects\commandlineutils\src\CommandLineUtils\Conventions\ExecuteMethodConvention.cs:line 62
   at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.<>c__DisplayClass0_0.<<Apply>b
__0>d.MoveNext() in 
C:\projects\commandlineutils\src\CommandLineUtils\Conventions\ExecuteMethodConvention.cs:line 25
--- End of stack trace from previous location where exception was thrown ---
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.<>c__DisplayClass126_0.<OnExecute>b__0() 
in C:\projects\commandlineutils\src\CommandLineUtils\CommandLineApplication.cs:line 505
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args) in 
C:\projects\commandlineutils\src\CommandLineUtils\CommandLineApplication.cs:line 611
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute[TApp](CommandLineContext context) 
in C:\projects\commandlineutils\src\CommandLineUtils\CommandLineApplication.Execute.cs:line 57
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync[TApp](CommandLineContext 
context) in C:\projects\commandlineutils\src\CommandLineUtils\CommandLineApplication.Execute.cs:line 145
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync[TApp](IConsole console, 
String[] args) in C:\projects\commandlineutils\src\CommandLineUtils\CommandLineApplication.Execute.cs:line 
130
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync[TApp](String[] args) in 
C:\projects\commandlineutils\src\CommandLineUtils\CommandLineApplication.Execute.cs:line 112

我似乎无法克服这一点。我已经尝试从 C:\Windows\System32\inetsrv\config\applicationHost.config 将 setProfileEnvironment 设置为 true,但错误仍然存​​在。您能建议我尝试在本地计算机上设置一些东西吗?

我正在按照本文 https://medium.com/@ganeshsirsi/how-to-run-owasp-zap-security-tests-part-of-azure-devops-ci-cd-pipeline-484da8793a12 尝试在 Azure DevOps 中进行设置。

谢谢!

最佳答案

注意以下几点:

  1. 在管理模式下运行此命令。
  2. 此扩展需要 CLI 2.2.0 或更高版本。
  3. 引用this文档以了解其正确用法。

关于windows - 访问路径 'C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\Windows\INetCache\Content.IE5'被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65320915/

相关文章:

c++ - 确定远程应用程序访问/更改的内存/值?

azure - 为什么 docker login 将我的密码存储在未加密的文件夹中,我应该对此采取措施吗?

android - Azure DevOps Gradle "Java heap space"错误

azure - 使用 Azure CLI 在 HDInsight 上安装外部 python 包 : RdfeResourceHandlerException

Powershell 匹配行列表中的精确字符串

windows - 需要确定以太网适配器的网络访问类型

powershell - 查找并替换同时包含双引号和方括号的字符串

windows - 如何解决宏长度超过 2500 行,这可能需要很长时间才能加载

c++ - 控制台窗口利用 pc 的 USB 资源

windows - 如何在 Windows 命令行上获取文件的创建日期?