Я использовал "Git зеркало", чтобы решить свою проблему. И я использовал PAT.
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
steps:
- script: |
cd /tmp && rm -rf /tmp/$(TmpRepoDir)
git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" clone --mirror $(Build.Repository.Uri) $(TmpRepoDir)
git -C /tmp/$(TmpRepoDir) push --mirror https://{anything}:{PTA}/{organization}/{project name}/_git/{repository name}
displayName: 'Copy to GitLab'