AZDO pipeline support does not recognize visualstudio.com as a valid AZDO host
Output from azd version
azd version 0.3.0-beta.5 (commit 38169d7067ac73dc4e214e6913bee5e5359b8b15)
Output from az version
{
"azure-cli": "2.41.0",
"azure-cli-core": "2.41.0",
"azure-cli-telemetry": "1.0.8",
"extensions": {
"containerapp": "0.3.13",
"log-analytics": "0.2.2",
"rdbms-connect": "1.0.4"
}
}
Describe the bug Receiving an error that's blocking my ability to setup AZDO pipelines until I change my origin URL
To Reproduce
- sign into an AZDO repo that automatically redirects you to VisualStudio.com
- clone code from AZDO repo
- run
azd pipeline config --provider azdo - observe error message
Error: ensuring git remote: existing remote is not an Azure DevOps host
Expected behavior Expected that other valid URLs would be recognized
| example |
|---|
<Azure DevOps Org Name>.visualstudio.com |
Environment * PowerShell 7.2.7
Additional context
- The regex is checking for a specific URL
Also blocked with a URL of the pattern similar to:
https://dev.azure.com/mydevOpsOrgName/myProjectName
@hattan can you help triage this?
Thanks for the feedback @KSchlobohm. This is due to how we validate Azure DevOps urls to ensure that existing remotes match a users selection when running azd pipeline config --provider azdo
We can definitely add support for the visualstudio.com domain.
Until that is available there is a workaround which is to set the organization to use the newer dev.azure.com domain. This is can be found under Organization Settings -> General
https://dev.azure.com/<ORG_NAME>/_settings/organizationOverview
https://dev.azure.com/mydevOpsOrgName/myProjectName
In terms of this URL pattern, we do validate that https urls are specifically git remotes in this format. https://<ORG_NAME>@dev.azure.com/<ORG_NAME>/<PROJECT>/_git/<PROJECT>
but we will investigate further and look into adding the visualstudio.com domain as well.
I'd like to put it out there that I don't have permissions to change the ADO settings for my org. As a result, the workaround by @hattan below does not work for me.
Thanks for the feedback @KSchlobohm. This is due to how we validate Azure DevOps urls to ensure that existing remotes match a users selection when running
azd pipeline config --provider azdoWe can definitely add support for the visualstudio.com domain.
Until that is available there is a workaround which is to set the organization to use the newer dev.azure.com domain. This is can be found under Organization Settings -> General
https://dev.azure.com/<ORG_NAME>/_settings/organizationOverview
![]()
https://dev.azure.com/mydevOpsOrgName/myProjectName
In terms of this URL pattern, we do validate that https urls are specifically git remotes in this format. https://<ORG_NAME>@dev.azure.com/<ORG_NAME>//_git/
but we will investigate further and look into adding the visualstudio.com domain as well.
Hello, I'm also running into this issue.
azd cli version 1.5.1
error message after entering PAT: ERROR: ensuring git remote: existing remote is not an Azure DevOps host
git remote url: https://dev.azure.com/organization/Project/_git/ProjectRepo
It only supports this pattern by now according to https://github.com/Azure/azure-dev/blob/4a1aba4535d394c5f7ccc2d46576e4b8f3fb8681/cli/azd/pkg/pipeline/azdo_provider.go#L425
https://<ORG_NAME>@dev.azure.com/<ORG_NAME>//_git/ After cloning using the pattern and it seems work.
Hi? Is there any update on this as it's not possible to change the domain pattern in my situation.
@geegee4iee , I've created a PR for it