如何使用两步验证连接 azure devops 和 bitbucket

How to connect azure devops and bitbucket using 2 step verification

我目前使用 OAuth 身份验证将 bitbucket cloud 连接到 azure-devops,如文档中所述 - https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/bitbucket?view=azure-devops&tabs=yaml

我想在 BitBucket 上启用两步验证 - https://support.atlassian.com/bitbucket-cloud/docs/enable-two-step-verification/

有人可以告诉我 Azure Devops 需要进行哪些更改才能使用两步验证连接到 bitbucket 以及我将如何进行此设置

感谢任何帮助! 谢谢!

How to connect azure devops and bitbucket using 2 step verification

众所周知,启用两步验证将加强对用户帐户的保护。但是,启用两步验证 (2SV) 会使克隆、拉取和推送到帐户存储库变得复杂,如果它们是通过 HTTPs 访问的话。

因此,如果我们使用 SSH 访问存储库,启用两步验证后没有任何变化。

如果您使用 HTTPs 访问,启用 2SV 后,您将需要配置一个访问令牌(BitBucket 称之为 app password)并使用它进行身份验证。当提示输入凭据时,输入令牌作为用户名并将密码字段留空,或者使用令牌代替您的密码。

App passwords are substitute passwords for a user account which you can use for scripts and integrating tools to avoid putting your real password into configuration files.

App passwords are designed to be used for a single purpose with limited permissions, so they don't require two-step verification (2SV). This means app passwords can be used by users with 2SV make API calls to their Bitbucket account, and to integrate Bitbucket with other tools like Sourcetree and Bamboo.