What specific syntax and/or configuration needs to be changed below in order for an Azure CLI command to successfully import a private source repo from GitHub into a private destination repo in Azure Repos?
CURRENT COMMAND AND ERROR RESPONSE:
C:\path\to\working\directory>az repos import create --git-source-url https://github.com/ValidGitHubOrgName/valid-gh-repo-name --repository ValidAzureReposDestinationRepoName --organization https://dev.azure.com/ValidOrgName --project ValidProjectName --requires-authorization
Git Password / PAT:
Confirm Git Password / PAT:
ClientRequestError: Operation returned a 400 status code.
WHAT WORKS:
When we use the above to import a public repository from GitHub into a private Azure Repos repo, the above completes without error as along as we of course remove the --requires-authorization flag.
WHAT FAILS:
However the above fails when we try to import a private GitHub repository with the full syntax shown above.
We have tried this not only with a valid GitHub password but also with a valid Azure DevOps Personal Access token that we give when prompted as shown above.
Do we need to add configuration in order for the import to work without error?
And also, how can we make sure the import command executes without an interactive request of credentials?
This needs to run in automation without an interactive human user.
The documentation here does not seem to include the instructions we require.





