Hi I want to push my project to GitHub from Azure Team Foundation Server using Azure Pipelines.
I have tried same task (push project to GitHub) from Azure Git using Azure pipeline using below commands in PowerShell Command In-line;
Required Token: AZURE_PERSONAL_ACCESS_TOKEN & GITHUB_PERSONAL_ACCESS_TOKEN
Step1: git clone --mirror https://$(AZURE_PERSONAL_ACCESS_TOKEN )@$(AZURE_REPO_CLONE_URL)
Step2: git checkout -b master
Step3: $gitHubUrl = "https://$(GITHUB_PERSONAL_ACCESS_TOKEN )@$(GITHUB_REPO_CLONE_URL)"
if(($url)) { git remote add origin $gitUrl }
else { git remote set-url origin $gitUrl }
step4: git push --mirror "https://$(GITHUB_PERSONAL_ACCESS_TOKEN )@$(GITHUB_REPO_CLONE_URL)"
The above code works for push project to GITHUB from Azure Git but current Code not working for Azure TFS.