Azure / Azure/azure-devops-cli-extension

No option to pass or configure the source import repo user PAT token or password and or use SSH key

Open
#1,050 3 comments 1 reaction 0 assignees View on GitHub
Area: ProToCol bug
Dominant language
Python
Stars
682
Forks
278
Avg merge
3d 23h
Merged PRs (30d)
3

Description

No option to pass or configure the source import repo user PAT token or password and or use SSH key
https://github.com/Azure/azure-devops-cli-extension/blame/master/tests/test_reposImportTest.py

**To Reproduce**
Azure Cli Version: 2.11.1
Use az --version
Look for something like-
azure-cli (2.0.70)

Azure-Devops extension version: 0.18.0
Use az --version
Look for something like-
Extensions:
azure-devops (0.18.0)

Steps to reproduce the behavior:
1. login using az login
2. set subscription to which devops org is created from
3.
```
az repos import create --git-source-url --org https://dev.azure.com/orgname/ --project projname --repository reponame --requires-authorization --user-name username
```
4. prompted to enter PAT twice

5. See error

TF401019: The Git repository with name or identifier reponame does not exist or you do not have permissions for the operation you are attempting.

**Expected behavior**
Importing and successfully imported

6.
```
az repos import create --git-source-url --org https://dev.azure.com/orgname/ --project projname --repository reponame --requires-authorization --user-name username:PATtoken
```

7. See
Git password /PAT:

**Expected behavior**
Importing and successfully imported

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.