Forum Discussion
rfrezino
Aug 21, 2023Copper Contributor
How to register an azure pipeline from a Github Repository using Azure Devops API
Hello! I'm working on automating Azure Pipeline registrations. (to work similarly to GitHub actions) Our scenario is: Our repositories are located on Github Yes, the service connection is there....
Kidd_Ip
Jul 19, 2025MVP
Take this as workaround by using Azure CLI + Script:
1. Install Azure DevOps CLI
az extension add --name azure-devops
2. Authenticate and Set Context
az devops configure --defaults organization=https://dev.azure.com/YourOrg project=YourProject
3. Create Pipeline from GitHub Repo
az pipelines create \
--name "MyPipeline" \
--repository "https://github.com/YourOrg/YourRepo" \
--branch "main" \
--yml-path "automation/pipeline.yaml" \
--repository-type github \
--service-connection "GitHubServiceConnectionName"
It can:
• Links the pipeline to your GitHub repo
• Points to the YAML file
• Uses the existing service connection