Unable to run az pipelines create with the service connection parameter
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
> ### `az feedback` auto-generates most of the information requested below, as of CLI version 2.0.62
**Related command**
```
az pipelines create `
--name `
--repository `
--yml-path `
--folder-path `
--service-connection
```
**Describe the bug**
When running the `az pipelines create` command listed above without the service connection parameter, I am presented with:
```
Which service connection do you want to use to communicate with GitHub?
[1] Create a new GitHub service connection
[2]
[3]
```
When I type in 2 and press enter, the command finishes and the pipeline is now created in Azure DevOps.
However, I would like to run this command as part of a script that is non-interactive which means I need to use the `--service-connection` parameter. When I run the full command listed above in "Related command", I am presented with:
`Could not create service hooks subscription. The repository does not reference a service connection.`
If the pipeline already exists I am presented with:
`Pipeline with name already exists.`
**To Reproduce**
With the source code in GitHub, and pipelines in Azure Devops, run `az pipelines create` with the same parameters used.
**Expected behavior**
I would expect:
1. Run the full command (with the service connection name).
2. Without any interaction, the az cli commands finishes.
3. The new pipeline is created in Azure DevOps.
**Environment summary**
- Windows 10 Enterprise, OS build 19044
- Installer: MSI
- Azure CLI: 2.43.0
- Extensions: azure-devops - 0.25.0
- Shell type: bash
Contributor guide
Assessment
This issue has not been assessed yet.