Coder Social home page Coder Social logo

Comments (19)

ryanberger-az avatar ryanberger-az commented on September 26, 2024 4

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.

DHowett avatar DHowett commented on September 26, 2024 2

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.

v-mohithgc avatar v-mohithgc commented on September 26, 2024 1

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

@v-mohithgc @DHowett

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.

geekzter avatar geekzter commented on September 26, 2024

@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.

DHowett avatar DHowett commented on September 26, 2024

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.

rdumitru avatar rdumitru commented on September 26, 2024

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.

DevTestUser123 avatar DevTestUser123 commented on September 26, 2024

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

@v-mohithgc @DHowett

from azure-pipelines-tasks.

DHowett avatar DHowett commented on September 26, 2024

@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.

v-mohithgc avatar v-mohithgc commented on September 26, 2024

The new version of this task is out, which will fix the issue. please check and confirm back. Thanks

from azure-pipelines-tasks.

DevTestUser123 avatar DevTestUser123 commented on September 26, 2024

No still not working on self hosted agent.

from azure-pipelines-tasks.

v-mohithgc avatar v-mohithgc commented on September 26, 2024

No still not working on self hosted agent.

What is the task version picked up by your agent?

from azure-pipelines-tasks.

DevTestUser123 avatar DevTestUser123 commented on September 26, 2024

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.

v-mohithgc avatar v-mohithgc commented on September 26, 2024

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.

rdumitru avatar rdumitru commented on September 26, 2024

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.

v-snalawade avatar v-snalawade commented on September 26, 2024

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.

DevTestUser123 avatar DevTestUser123 commented on September 26, 2024

Which is the required PowerShell version to use so that I cant get an error?

from azure-pipelines-tasks.

imerzan avatar imerzan commented on September 26, 2024

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.

DevTestUser123 avatar DevTestUser123 commented on September 26, 2024

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.

ryanberger-az avatar ryanberger-az commented on September 26, 2024

from azure-pipelines-tasks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.