gitazure-pipelines-release-pipelineagent

Azure Devops 'git' is not recognized as an internal or external command on my Release pipeline


I am trying to build my release pipeline to copy files from one repo to another (in the same project) using Git commands but I keep getting "git not recognized error"

The first task is only cloning the repo so I'm not sure why it's giving me an error.

I gave permissions to the agent pool, I have the "allow access to Oauth token" checkmarked, and I made my PAT and prepended it to my url. I'm not sure what is wrong at this point.

my first task is only a git clone in the Classic editor

enter image description here


Solution

  • You need to install git on your system as are mentioned in the error. It is not properly installed or available in the PATH variables of the system.

    You can download it from here: Downloads

    Additionally,

    You may not have set your PATH correctly to point at your Git installation.

    You need to add the following paths to PATH:

    C:\Program Files\Git\bin
    C:\Program Files\Git\cmd\

    Also, you can check this answer for more details: Git not recognized