In my Azure DevOps CD pipeline, I have added a Command Line task which clones a Git repository. The clone is done successfully however there is an error in the log.
The strange behavior is that the clone works perfectly with an Azure hosted agent (like vs2017-win2016 or windows-2019) but generates the error (see below screenshot) if I use a private local agent.
Command Line Script:
git config --global user.email "[email protected]"
git config --global user.name "naregk"
git clone -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" https://naregk.visualstudio.com/txproject/_git/RepoD testrepoD
The stage outcome:
The error which appears:
57.7114907Z ##[command]"C:\Nindows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "C:\agent_work_temp\aae38ede—905d—4d6d-9412-0 57.96819332 ##[error]Cloning into 'testrepoD'... 06.96751142 ##[section]Finishing: Command Line Script