所以我刚刚更新到一个新的Visual studio版本,我不再能够推/拉我的azure git回购(克隆工作很好)。

我得到的确切错误是

无法确定此“dev.azure.com”远程服务器的组织名称 url。确保凭证。设置Usehttppath配置值, 或者将组织名称设置为远程url中的用户 {org} @dev.azure.com。

只有拉命令显示我这个错误,所有其他失败的git致命错误。我搞砸了我的证书经理,因为我怀疑这可能是一个造成的问题,但没有运气。


当前回答

在Visual Studio Code中,你没有工具>选项>源代码控制> Git全局设置选项

打开一个GIT bash(安装时启用了GIT Credential Manager for Windows),然后运行

git config credential.useHttpPath true

其他回答

Ok, so I encountered this problem today when I updated VS2019 to 16.9.6 (from 16.8.x). I tried the recommended answer and that failed - very strangely, actually, VS refused to persist my changes to the GIT global settings (let me change them in the dialog, but fetch/push still failed, and when I looked at the settings again, they were back to "unset"). I tried another answer above, updating gcm-core, but still made no difference. In the end I removed git entirely, then reinstalled the latest version (2.31.1) - and suddenly it worked.

由于这次经历让我很沮丧,我想我应该把最后对我有用的东西贴出来,说不定它能帮助到其他人。

嗨,我使用SourceTree并有相同的错误消息,我通过更改来解决它:

打开设置/远程,并单击编辑按钮。变化:

(公司名称)https:// .visualstudio.com/ [path-to-repo]

to

[path-to-repo] https://[公司名称]@dev.azure.com/

不可知的ide解决方案对我来说是有效的:

打开命令提示符 执行git config——global credential命令。useHttpPath true(——global参数是可选的)

Git-Credential-Manager-for-Windows文档

在“工具”下>“选项”下>“源控制”下>“凭据帮助”下选择“windows下的GMC”

VS一直是客户的痛苦

我刚刚用git bash更新了git for windows的git update-git-for-windows。然后在安装时选择了新的不弃用的凭据管理器,现在它工作正常。