简体   繁体   English

Azure DevOps 管道 CMD 任务 [错误] 访问被拒绝

[英]Azure DevOps Pipeline CMD task [error]Access is denied

I was trying to kill a process CJobs.exe using agent job command line execution task in Azure release pipeline.我试图在 Azure 发布管道中使用代理作业命令行执行任务来终止进程 CJobs.exe。
My command is:我的命令是:

start /b cmd /c taskkill /IM "CJobs.exe" /F
exit

but it is giving me this error:但它给了我这个错误:

##[error]ERROR: The process "CJobs.exe" with PID 12569 could not be terminated.
Reason: Access is denied.

So if any one knows solution for this problem, please help.因此,如果有人知道此问题的解决方案,请提供帮助。
ask if more details required in comments.询问评论中是否需要更多详细信息。

You can check the log on account of the self-hosted agent in the local service and change the account to the account you need to perform the operation.您可以在本地服务中查看自托管代理的登录帐户,并将该帐户更改为执行操作所需的帐户。

在此处输入图像描述

在此处输入图像描述

In my case this error was solved when I did this configuration on the Azure Pipeline Agent service: I selected the option "Allow service to interact with desktop".在我的情况下,当我在 Azure 管道代理服务上进行此配置时,此错误已解决:我选择了“允许服务与桌面交互”选项。

Configuration Services Azure Pipeline Agent配置服务 Azure 管道代理

In this way, after restart the service, the pipeline executed successful.这样,重启服务后,管道执行成功。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从 azure devops 管道任务执行 git 克隆时出错 - Error performing git clone from azure devops pipeline task Azure devops 管道任务错误:Measure-Command 调用失败 - Azure devops pipeline task error : Measure-Command invocation fails 如何通过发布管道 CMD 任务自动将文件上传到 Azure DevOps 存储库 - How to Automatically upload a file to Azure DevOps repository through a release pipeline CMD task 拒绝:在 Azure DevOps 管道中检索权限失败 - Denied: retrieving permissions failed in Azure DevOps pipeline 在 azure devops 中选择发布管道中的任务 - selection of task in release pipeline in azure devops Azure DevOps - 恢复数据库的管道发布任务 - Azure DevOps - Pipeline Release Task to Restore Database Azure 任务步骤名称的 devops 管道变量 - Azure devops pipeline variable for a task step name 访问多个订阅的 Devops Pipeline 任务 - Devops Pipeline task to access multiple subscriptions azure devops 管道 docker 撰写推送任务失败:EACCES:权限被拒绝,scandir '/home/vsts/work/1/s/data' - azure devops pipeline docker compose push task fails with: EACCES: permission denied, scandir '/home/vsts/work/1/s/data' Azure DevOps 管道任务等待另一个管道完成 - Azure DevOps pipeline task to wait to run for another pipeline to complete
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM