C #을 통해 코드 생성에 대해 질문합니다 : this .
그래서 내 코드는 다음과 같습니다.
var _tfsUrl = "http://mytfs.domain.local:8080/tfs/Collection_Name/";
VssCredentials c = new VssCredentials(new WindowsCredential());
using (var connection= new VssConnection(new Uri(_tfsUrl), c))
{
var client = connection.GetClient<TaskAgentHttpClient>();
var agentPools = client.GetAgentPoolsAsync().Result;
var result = client.AddAgentPoolAsync(new TaskAgentPool("Auto test pool_1")).Result; //error !
}
하지만 권한이 없습니다.
System.AggregateException: 'Web method running: [http://mytfs.domain.local:8080/tfs/Collection_Name/_apis/distributedtask/pools] (POST)pools[distributedtask] E2EId: some_uid'
AccessDeniedException: Access denied. 'UserName' needs Manage permissions to perform the action. For more information, contact the Azure DevOps Server administrator.
그래서 수동으로 에이전트 풀을 만들려고하는데 작동합니다!
내 사용자 이름은 '에이전트 풀-> 보안'에서 관리 권한이 있습니다.
내 역할은 빌드 관리자, 프로젝트 관리자, 릴리스 관리자입니다.
이 문제를 해결하는 방법을 알려 주시겠습니까? 감사합니다!
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다