You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If git origin is configured to a SSH URL, azd panics on azd pipeline config
To Reproduce
In a git repository, configure origin to use Azure DevOps via SSH, i.e., git remote set-url origin git@ssh.dev.azure.com:v3/<project>/<organization>/<repo>. This can be obtained by using the SSH connection when viewing an Azure DevOps repository.
Run azd pipeline config --provider azdo
Provide a PAT when prompted
azd errors out. See below:
root@weilim-z4:~/todo-java-mongo# azd pipeline config --provider azdo
Using pipeline provider: Azure DevOps
You need an Azure DevOps Personal Access Token (PAT). Please create a PAT by following the instructions here
https://aka.ms/azure-dev/azdo-pat
(skip this prompt by setting the PAT to env var: AZURE_DEVOPS_EXT_PAT)
? Personal Access Token (PAT): ******
Creating or updating service principal az-dev-10-11-2022-18-18-02.
panic: runtime error: index out of range [1] with length 1
goroutine 1 [running]:
github.com/azure/azure-dev/cli/azd/pkg/commands/pipeline.(*AzdoScmProvider).gitRepoDetails(0xc00041c200, {0xc43a78, 0xc000412360}, {0xc000126500, 0x3b})
/mnt/vss/_work/1/s/cli/azd/pkg/commands/pipeline/azdo_provider.go:459 +0xb5e
github.com/azure/azure-dev/cli/azd/pkg/commands/pipeline.(*PipelineManager).ensureRemote(0xc0001a1580, {0xc43a78, 0xc000412360}, {0xc000028024, 0x15}, {0xb3026f, 0x6})
/mnt/vss/_work/1/s/cli/azd/pkg/commands/pipeline/pipeline_manager.go:67 +0x107
github.com/azure/azure-dev/cli/azd/pkg/commands/pipeline.(*PipelineManager).getGitRepoDetails(0xc0001a1580, {0xc43a78, 0xc000412360})
/mnt/vss/_work/1/s/cli/azd/pkg/commands/pipeline/pipeline_manager.go:81 +0xfc
github.com/azure/azure-dev/cli/azd/pkg/commands/pipeline.(*PipelineManager).Configure(0xc0001a1580, {0xc43a78, 0xc000412360})
/mnt/vss/_work/1/s/cli/azd/pkg/commands/pipeline/pipeline_manager.go:223 +0x478
github.com/azure/azure-dev/cli/azd/cmd.(*pipelineConfigAction).Run(0xc000014310, {0xc43a78, 0xc0003e7b90}, 0x0?, {0x0?, 0x0?, 0x0?}, 0xc00038cb30)
/mnt/vss/_work/1/s/cli/azd/cmd/pipeline.go:110 +0x2f0
github.com/azure/azure-dev/cli/azd/pkg/commands.Build.func1.1({0xc43a78?, 0xc0003e7b90?})
/mnt/vss/_work/1/s/cli/azd/pkg/commands/builder.go:64 +0x49
github.com/azure/azure-dev/cli/azd/pkg/commands.runCmdWithTelemetry({0xc43a78, 0xc0003e7b60}, 0x8?, 0xc0002dfa40)
/mnt/vss/_work/1/s/cli/azd/pkg/commands/builder.go:88 +0x148
github.com/azure/azure-dev/cli/azd/pkg/commands.Build.func1(0xc0003ebb80, {0xc0000add40, 0x0, 0x2})
/mnt/vss/_work/1/s/cli/azd/pkg/commands/builder.go:70 +0x147
github.com/spf13/cobra.(*Command).execute(0xc0003ebb80, {0xc0000add20, 0x2, 0x2})
/home/cloudtest/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:856 +0x67c
github.com/spf13/cobra.(*Command).ExecuteC(0xc0003a8f00)
/home/cloudtest/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:974 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
/home/cloudtest/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:902
github.com/azure/azure-dev/cli/azd/cmd.Execute({0xc0000240b0, 0x4, 0x4})
/mnt/vss/_work/1/s/cli/azd/cmd/root.go:106 +0x6e
main.main()
/mnt/vss/_work/1/s/cli/azd/main.go:51 +0x1d2
Expected behavior azd pipeline config should ideally support git configured via ssh. Otherwise, it should handle it more gracefully.
Environment
Additional context
The text was updated successfully, but these errors were encountered:
Output from
azd version
Run
azd version
and copy and paste the output here:azd version 0.3.0-beta.2 (commit 91a2c01)
Output from
az version
Run
az version
and copy and paste the output here (minimum required version is 2.38.0):Describe the bug
If git
origin
is configured to a SSH URL,azd
panics onazd pipeline config
To Reproduce
origin
to use Azure DevOps via SSH, i.e.,git remote set-url origin git@ssh.dev.azure.com:v3/<project>/<organization>/<repo>
. This can be obtained by using the SSH connection when viewing an Azure DevOps repository.azd pipeline config --provider azdo
Expected behavior
azd pipeline config
should ideally support git configured via ssh. Otherwise, it should handle it more gracefully.Environment
Additional context
The text was updated successfully, but these errors were encountered: