I cannot clone a simple repository from Azure DevOps. OS: Ubuntu 18.10
I do this:
Git http.extraheader & bearer
YAML style Pipelines can use the preset variable System.AccessToken. After examining the formal 'Checkout ...' step at the beginning of the Pipeline I found this step to work in my script:
- task: PowerShell@2
inputs:
targetType: 'inline'
script: 'git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" clone --depth 1 https://my-org@dev.azure.com/my-org/my-proj/_git/my-repo'
Note that Azure DevOps job authorization scope may affect this