遵循文档 here ,我尝试使用以下命令创建存储库:
az repos create --name 示例
返回以下错误:
The command failed with an unexpected error. Here is the traceback:
TF401019: The Git repository with name or identifier client does not exist or you do not have permissions for the operation you are attempting. Operation returned an invalid status code of 404.
我已运行 az login
命令,并使用以下命令将组织和项目设置为配置中的默认值:
az devops configure --defaultsorganization=https://dev.azure.com/exampleproject=example
如何使用 Azure DevOps CLI 创建存储库?
最佳答案
有 been seen here对于 accounts using 2FA
I tried something else - I did not delete the Git credentials, but I chose the option to modify them and I used login/password I generated as alias to my primary username (the one I used in the cli).
After VS restart I was able to push my changes.This is only a workaround (my primary account still does not work in vs), but it will make my life easier for now.
另外:
I got a hint from another forum that i should try to run VS as an administrator (or as another user) and it worked.
I used the same account to authenticate in TFS, which is not working for my windows user account i normally use.
关于git - 如何使用 Azure CLI 创建 Azure DevOps 存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55896570/