Open tomo-mae1 opened 2 months ago
This issue doesn't occur with AzureFileCopyV5. I believe this is because V5 not use auto-login to authenticate AzCopy.exe.
Hi @tomo-mae1 Could you install Get-AzContext module on your agent machine and check if still the error continues?
Hey @tomo-mae1 do you use 1ES Hosted Pool
or Azure Pipelines agent pool
?
Hello, @v-schhabra and @LeftTwixWand I used Azure Pipelines agent pool, that image is windows-latest. I believe microsoft hosted windows agent has all the azure powershell modules installed.
@tomo-mae1 Yes, If you are using Microsoft hosted windows agent then the agent will have all the modules installed.
Thank you. If so, I believe the agent machine has Get-AzContext module Installed.
Any updates on this issue? It occurs on the target machine, not the agent machine. Powershell 7 and required Az Modules had to be installed manually even though it's undocumented in the task prerequisites, and afterwards we run into the same issue.
New issue checklist
Task name
AzureFileCopy
Task version
6.245.1
Issue Description
I'm testing the AzureFileCopyV6 task because I want to copy a file in a repository to a specific folder on an Azure VM. After resolving some errors, I was blocked by the following error that I don't know how to solve.
Error: Failed to perform Auto-login: PSContextCredentialGet-AzAccessToken: -REDACTED-;1mRun Connect-AzAccount to login.
I think task was probably using AzCopy.exe twice, but the error occurs the second time.
I installed Azure PowerShell on the target VM, but the issue persisted. Is this a bug? Or is there something missing in my settings?
Environment type (Please select at least one enviroment where you face this issue)
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
Windows 11
Relevant log output
Full task logs with system.debug enabled
Azure-file-copy-v6.log
Repro steps