#windows #azure #powershell #devops
#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:WINDOWSsystem32configsystemprofileAppDataLocalMicrosoftWindowsINetCacheContent.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:a1ssrcArtifactToolCommandsUPackUPackPublishCommand.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:a1ssrcArtifactToolCommandsUPackUPackExceptionMapper.cs:line 39
at ArtifactTool.Commands.UPackPublishCommand.ExecuteAsync() in
D:a1ssrcArtifactToolCommandsUPackUPackPublishCommand.cs:line 63
at ArtifactTool.Commands.CommandBase.OnExecuteAsync() in
D:a1ssrcArtifactToolCommandsCommandBase.cs:line 105
at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.InvokeAsync(MethodInfo
method, Object instance, Object[] arguments) in
C:projectscommandlineutilssrcCommandLineUtilsConventionsExecuteMethodConvention.cs:line 77
at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.OnExecute(ConventionContext
context) in C:projectscommandlineutilssrcCommandLineUtilsConventionsExecuteMethodConvention.cs:line 62
at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.<>c__DisplayClass0_0.<<Apply>b
__0>d.MoveNext() in
C:projectscommandlineutilssrcCommandLineUtilsConventionsExecuteMethodConvention.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:projectscommandlineutilssrcCommandLineUtilsCommandLineApplication.cs:line 505
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args) in
C:projectscommandlineutilssrcCommandLineUtilsCommandLineApplication.cs:line 611
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute[TApp](CommandLineContext context)
in C:projectscommandlineutilssrcCommandLineUtilsCommandLineApplication.Execute.cs:line 57
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync[TApp](CommandLineContext
context) in C:projectscommandlineutilssrcCommandLineUtilsCommandLineApplication.Execute.cs:line 145
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync[TApp](IConsole console,
String[] args) in C:projectscommandlineutilssrcCommandLineUtilsCommandLineApplication.Execute.cs:line
130
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync[TApp](String[] args) in
C:projectscommandlineutilssrcCommandLineUtilsCommandLineApplication.Execute.cs:line 112
Кажется, я не могу пройти мимо этого. Я уже пытался получить setProfileEnvironment
true из C:WindowsSystem32inetsrvconfigapplicationHost.config но все равно ошибки сохраняются. Можете ли вы предложить что-нибудь, что я могу попытаться настроить на своем локальном компьютере?
Я следую за попыткой установки в Azure DevOps из этой статьи https://medium.com/@ganeshsirsi/how-to-run-owasp-zap-security-tests-part-of-azure-devops-ci-cd-pipeline-484da8793a12
Спасибо!
Комментарии:
1. Вы пробовали запускать powershell от имени администратора?
2.
Content.IE5
является соединением (точкой повторной обработки) и ссылается наC:WINDOWSsystem32configsystemprofileAppDataLocalMicrosoftWindowsINetCacheIE
.3. Какова ваша версия CLI /?
4. Я использую PowerShell Admin с Azure cli версии 2.15.1.*
Ответ №1:
Обратите внимание на следующие пункты:
- Запустите эту команду в режиме администратора.
- Для этого расширения требуется CLI 2.2.0 или выше.
- Обратитесь к этому документу для его надлежащего использования.
Комментарии:
1. Я использую PowerShell Admin с azure cli версии 2.15.1. * все еще существует проблема