gpt4 book ai didi

git - 当我尝试从 azure git 进行 git clone 时如何进行身份验证?

转载 作者:行者123 更新时间:2023-12-01 21:30:41 24 4
gpt4 key购买 nike

我尝试将我的应用程序服务从Azure平台的git本地代表克隆到本地环境(在PC上)。但是当我执行 git clone < https://[email protected] 时/appser.git> 控制台询问我有关使用管理员用户名登录的身份验证。但密码是多少?它不是 MicrosoftAppPassword,当我尝试使用它时,身份验证失败。密码是什么?

最佳答案

How to authenticate when I try to git clone from azure git?

当您尝试从 azure git 进行 git clone 时,您可以使用个人访问 token (PAT) 或 SSH 进行身份验证。

Authenticate with personal access tokens

命令如下:

https://<OrganizationName>@dev.azure.com/<OrganizationName>/MyTestProject/_git/TestSample

然后我们需要将firstOrganizationName替换为PAT。所以,它将是:

https://<PAT>@dev.azure.com/<OrganizationName>/MyTestProject/_git/TestSample

或者您可以使用 SSH key 进行身份验证:

Use SSH key authentication

git clone <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="ff98968bbf8c8c97d19b9a89d19e858a8d9ad19c9092" rel="noreferrer noopener nofollow">[email protected]</a>:v3/fabrikam-fiber/FabrikamFiber/FabrikamFiber

最后但并非最不重要的一点是,您还可以安装Git Credential Managers来登录Azure devops。安装完成后,使用 git clone 命令时会 pop 一个窗口让你输入用户名和密码:

Use Git Credential Managers to authenticate to Azure Repos

希望这有帮助。

关于git - 当我尝试从 azure git 进行 git clone 时如何进行身份验证?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62593521/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com