无法从管道作业克隆 Azure DevOps 存储库

hac*_*soi 3 git azure-devops azure-pipelines

我正在尝试从管道作业克隆 Azure DevOps 上的 git 存储库,但是,我收到以下错误(显示在 Azure DevOps 的管道终端中):

致命:无法读取“ https://test-nisohack@dev.azure.com ”的密码:终端提示已禁用

看起来它需要一个密码,但我不知道如何提供,甚至不知道该给它什么密码。

Sha*_*zyk 5

您需要提供密码,但当然不能,因为是在构建期间。

您可以通过两种方式解决它:

1)在命令中输入密码:

git clone https://username:password@dev.azure.com/organization/project/_git/repo
Run Code Online (Sandbox Code Playgroud)

2)创建个人访问令牌并将其放入命令中:

git clone https://PAT@dev.azure.com/organization/project/_git/repo
Run Code Online (Sandbox Code Playgroud)