我正在尝试在 Azure 中克隆我的 Web 应用程序。
当我运行git clone https://<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4c393f293e222d21290c2d3c3c222d2129623f2f21622d36393e293b292e3f2538293f62222938" rel="noreferrer noopener nofollow">[email protected]</a>:443/appname.git
时终端询问我的密码。
但是当我填写密码时,一直显示身份验证失败。
即使我在门户中多次更改密码(设置 -> 设置部署凭据)。
为什么它一直说我的身份验证失败?
最佳答案
是的,这里的许多答案都指向正确的路径,但我的情况:-我得到了一个 url 来访问 azure 云上的 git 存储库,我完全可以在浏览器上访问/浏览代码(< em>Vs)当我尝试克隆时我遇到了同样的问题。
因此,当您单击克隆(如下图所示)时,您必须生成 Git 凭据;这很奇怪,不知道为什么,可能他们已经设置了我的帐户来访问 azure 云,它不能用于克隆 git 存储库(意味着不能用作 git 凭据)。这与我在 AWS/gitlab/bitbucket 中看到的情况不同,可能是帐户设置的问题,或者如果这是 Azure 上存储库的常见问题,并且如果您遇到同样的问题 - 请尝试一下。
另一个,正如每个人都已经提到的,请不要尝试连接到那里生成的网址(看起来像这样):
https://<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f383819c99969087de9290909c869d87b3979685dd9289868196dd909c9e" rel="noreferrer noopener nofollow">[email protected]</a>/project-name/apps/_git/library/
尝试通过您的 GIT 用户名进行连接,然后使用密码:
https://<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="45303620372b242820052120336b243f3037206b262a28" rel="noreferrer noopener nofollow">[email protected]</a>/project-name/apps/_git/library/
提示:如果您的用户名中包含特殊字符,Git cmd/bash 将抛出错误,因此请将其替换为有效字符,例如。 :-
- @ 可以替换为 %40
- + 可以替换为 %2B
类似:https://username%<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="50646028292a7e333f3d103435267e312a2522357e333f3d" rel="noreferrer noopener nofollow">[email protected]</a>/project-name/apps/_git/library/
关于git - Azure Git 身份验证失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34837173/