Open vairakkumaar-svs-hf opened 4 years ago
@vairakkumar-vairaperumal you can set the environment variable AZURE_DEVOPS_EXT_GIT_SOURCE_PASSWORD_OR_PAT and it will work. I was facing the same issue, but after a lot of research, I found that setting env var called AZURE_DEVOPS_EXT_GIT_SOURCE_PASSWORD_OR_PAT it will work without any prompt.
I wrote the script in PowerShell to import from bitbucket to azure, and for every repo, it prompts me for a password so above helped me a lot now my script runs smoothly with no password prompting because I have stored my password to Env variable.
I hope that helps you, But I agree AZ CLI should have the option to take the password as input.
If we need to import a code from the other GIT Repos, you will need to create the target repos first with az repos create, after that use the az repos import create to inport your repos to the newly created repo .
az repos create --name $ReposName az repos import create --project $targetProjectName --git-source-url $Primary_ReposUrl --repository $ReposName
Perhaps someone with sufficient 🐮 powers can add AZURE_DEVOPS_EXT_GIT_SOURCE_PASSWORD_OR_PAT
to the docs for az repos import create
?
I just "got lucky" in stumbling upon this issue... tnx!
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:
login using az login
set subscription to which devops org is created from
prompted to enter PAT twice
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
See Git password /PAT:
Expected behavior Importing and successfully imported