Comments (19)
We are also still receiving this error on a self-hosted Windows 2019 Server based image. Any ideas on how to resolve? We are using a WIF for our Azure DevOps Service connection for this task. This was part of why we upgraded to version 6.
PowerShell Version: 5.1.14393.5582
AzFileCopy Version: 6.238.9
`Starting: AzureFileCopy
==============================================================================
Task : Azure file copy
Description : Copy files to Azure Blob Storage or virtual machines
Version : 6.238.9
Author : Microsoft Corporation
Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/azure-file-copy
==============================================================================
Added TLS 1.2 in session.
Import-Module -Name C:\Users\AzDevOps\Documents\WindowsPowerShell\Modules\Az.Accounts\2.17.0\Az.Accounts.psd1 -Global
Clear-AzContext -Scope CurrentUser -Force -ErrorAction SilentlyContinue
Clear-AzContext -Scope Process
Connect-AzAccount System.Collections.Hashtable
Set-AzContext System.Collections.Hashtable
Import-Module -Name C:\Users\AzDevOps\Documents\WindowsPowerShell\Modules\Az.Resources\6.16.1\Az.Resources.psd1 -Global
Import-Module -Name C:\Users\AzDevOps\Documents\WindowsPowerShell\Modules\Az.Storage\6.1.3\Az.Storage.psd1 -Global
Import-Module -Name C:\Users\AzDevOps\Documents\WindowsPowerShell\Modules\Az.Compute\7.2.0\Az.Compute.psd1 -Global
Import-Module -Name C:\Users\AzDevOps\Documents\WindowsPowerShell\Modules\Az.Network\7.4.1\Az.Network.psd1 -Global
##[warning]The names of some imported commands from the module 'Microsoft.Azure.PowerShell.Cmdlets.Network' include unapproved verbs that might make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb.
##[warning]The names of some imported commands from the module 'Az.Network' include unapproved verbs that might make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb.
mime: C:\a\_tasks\AzureFileCopy_eb72cb01-a7e5-427b-a8a1-1b31ccac8a43\6.238.9\MimeMapping.json
Account SubscriptionName TenantId Environment
------- ---------------- -------- -----------
REDACTED AZURE TENANT/SUBSCRIPTION
Uploading files from source path: 'C:\a\1\s\*.exe' to storage account: 'REDACTED' in container: 'REDACTED' with blob prefix: 'REDACTED-2-buildPipeline-20240423.7'
& "AzCopy\AzCopy.exe" copy "C:\a\1\s\*.exe" "[REDACTED"](REDACTED) --log-level=INFO --recursive
INFO: Scanning...
Failed to perform Auto-login: PSContextCredentialexec: "pwsh": executable file not found in %PATH%.`
from azure-pipelines-tasks.
Yes, judging by the contents of the task's make.json
:
"externals": {
"archivePackages": [
{
"url": "https://vstsagenttools.blob.core.windows.net/tools/azcopy/10.12/AzCopy.zip",
"dest": "./"
}
],
// ...
... and the contents of that archive ...
$ tar tf .\AzCopy.zip
AzCopy/AzCopy.exe
the path to azcopy.exe must contain AzCopy/
, otherwise the task is actually taking a dependency on the azcopy.exe available in the environment. This means that the task, instead of using AzCopy 10.12 which it ships with, will use whatever AzCopy is on the machine already. That can result in significant regressions if the agent contains an older AzCopy
.
from azure-pipelines-tasks.
Still getting same error:
failed with error: 'The term 'azcopy' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.' For more info please refer to https://aka.ms/azurefilecopyreadme
Hi @DevTestUser123, the changes have been merged today and it will take 5-7 working days to be deployed on all the regions.
The new version of the task (ie 6.238.0) will contain the fix.
from azure-pipelines-tasks.
@DHowett Thanks for creating the issue in this repo. Is this happening on Microsoft hosted or agent or a self-hosted agent? If the latter, what PowerShell version is installed?
@v-mohithgc @manolerazvan
from azure-pipelines-tasks.
Technically self-hosted; Microsoft internal (OneBranch). However... the issues I pointed out in the script are true regardless of the agent and powershell version, I believe. 🙂
from azure-pipelines-tasks.
We're also encountering the exact same issue for our internal Microsoft pipelines. v4 worked really well, but we've been waiting for v6 to use it with workload identity service connections.
from azure-pipelines-tasks.
Still getting same error:
failed with error: 'The term 'azcopy' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.' For more info please refer to https://aka.ms/azurefilecopyreadme
from azure-pipelines-tasks.
@DevTestUser123 Look, friend, I just reported the bug and the fine folks here are all subscribed to the thread. You don't need to ping all of us for every question.
from azure-pipelines-tasks.
The new version of this task is out, which will fix the issue. please check and confirm back. Thanks
from azure-pipelines-tasks.
No still not working on self hosted agent.
from azure-pipelines-tasks.
No still not working on self hosted agent.
What is the task version picked up by your agent?
from azure-pipelines-tasks.
6.238.9
No still not working on self hosted agent.
What is the task version picked up by your agent?
from azure-pipelines-tasks.
6.238.9
No still not working on self hosted agent.
What is the task version picked up by your agent?
Many users have confirmed that the new version of the task is working fine (in both Microsoft and self hosted agents), I suspect your error might be a different issue, mostly to do with your pipeline configurations.
If possible, send the debug logs to [email protected]
from azure-pipelines-tasks.
New version just dropped for us, but it's failing with this error:
Failed to perform Auto-login: PSContextCredentialexec: "pwsh": executable file not found in %PATH%.
from azure-pipelines-tasks.
New version just dropped for us, but it's failing with this error: Failed to perform Auto-login: PSContextCredentialexec: "pwsh": executable file not found in %PATH%.
what is powershell version installed?
from azure-pipelines-tasks.
Which is the required PowerShell version to use so that I cant get an error?
from azure-pipelines-tasks.
Also getting the error
Failed to perform Auto-login: PSContextCredentialexec: "pwsh": executable file not found in %PATH%.`
Switching to version 5 works (I had to do this first https://stackoverflow.com/questions/52769758/azure-blob-storage-authorization-permission-mismatch-error-for-get-request-wit )
from azure-pipelines-tasks.
Also getting the error
Failed to perform Auto-login: PSContextCredentialexec: "pwsh": executable file not found in %PATH%.`
Switching to version 5 works (I had to do this first https://stackoverflow.com/questions/52769758/azure-blob-storage-authorization-permission-mismatch-error-for-get-request-wit )
I am already using version 5 still didn't work for me, also gave required storage permission
from azure-pipelines-tasks.
from azure-pipelines-tasks.
Related Issues (20)
- [BUG]: Starting background process via AzureCLI task hangs whereas Bash task does not HOT 1
- [enhancement]: Change DotNetCoreCLI verbosityRestore defaultValue to Normal HOT 1
- [Question]: when task: AzureCLI@2 has version 2.60.0 by default? HOT 3
- [BUG]: IIS web app deploy - V0.235.1 - Error: Unrecognized argument '-'.
- [BUG]: DockerInstaller@0 keeps getting intermittent certificate error HOT 3
- [BUG]: Total test run duration/count is incorrectly calculated from junit xml report HOT 2
- [Question]: How to use the Publish Pipeline Metadata task HOT 1
- AzureCLI task is failing with error "The term 'Get-AzADGroup' is not recognized as a name of a cmdlet, function, script file, or executable program" HOT 7
- [enhancement]: AzureFunctionApp Task does not update the LinuxFxVersion to match the Runtime Stack
- [BUG]: AzurePowerShellV5 task is logging partial federatedToken
- [Question]: Is my error a result of needing to run CocoaPods task? HOT 1
- [BUG]: SqlAzureDacpacDeployment: does not server name when it contains a dot (Azure SQL Managed Instance)
- [BUG]: AzurePowerShell@5 is failing to find parameter FederatedToken HOT 3
- [Question]: Unable to download from Storage Account since using WIF and @AzureFileCopy6 HOT 7
- [Bug]: Failed to perform Auto-login: PSContextCredentialexec: "pwsh": executable file not found in %PATH%. HOT 10
- [Question]: Issue with the Federate Credential login on Azure Cli task HOT 7
- [BUG]: DockerV2 L0 test broken
- [BUG]: AzureResourceManagerTemplateDeployment failure after ubuntu-latest was updated to 22.04.4 (20240516.1.0) HOT 1
- [BUG]: AzureFunctionAppContainer@1 sets linuxFxVersion instead of windowsFxVersion for windows image HOT 2
- [BUG]: AzurePowerShell@5 is failing to install Az modules HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-pipelines-tasks.