简体   繁体   English

无法确定此“dev.azure.com”远程 url 的组织名称

[英]Cannot determine the organization name for this 'dev.azure.com' remote url

So i just updated to a new Visual studio version and I'm no longer able to push/pull from/to my azure git repo (cloning works fine).所以我刚刚更新到一个新的 Visual Studio 版本,我不再能够从我的 azure git 回购中推/拉(克隆工作正常)。

The exact error I get is我得到的确切错误是

Cannot determine the organization name for this 'dev.azure.com' remote url. ensure the credential.usehttppath configuration value is set, or set the organization name as the user in the remote url '{org}@dev.azure.com'.无法确定此“dev.azure.com”远程 url 的组织名称。确保设置了credential.usehttppath配置值,或将组织名称设置为远程 url“{org}@dev.azure.com”中的用户.

and only the pull command shows me this error, all the others are failing with git fatal error.并且只有 pull 命令向我显示此错误,所有其他命令均失败并出现 git 致命错误。 I messed with my Credentials Manager cos i suspected it might be the one causing the problem but no luck..我搞砸了我的凭据管理器,因为我怀疑它可能是导致问题的原因,但没有运气..

What fixed the issue for me is going to Tools > Options > Source Control > Git Global Settings, there I changed all 4 dropdowns which were still selected as "Unset":对我来说解决问题的是工具 > 选项 > 源代码管理 > Git 全局设置,在那里我更改了仍然选择为“未设置”的所有 4 个下拉菜单:

  • Prune remote branches during fetch - False在 fetch 期间修剪远程分支 - False
  • Rebase local branch when pulling - False拉动时重新设置本地分支 - False
  • Cryptographic network provider - OpenSSL加密网络提供商 - OpenSSL
  • Credential helper - GCM Core凭证助手 - GCM Core

Source: https://docs.microsoft.com/en-us/visualstudio/ide/git-with-visual-studio?view=vs-2019#personalize-your-git-settings资料来源: https://docs.microsoft.com/en-us/visualstudio/ide/git-with-visual-studio?view=vs-2019#personalize-your-git-settings

Note: These are the settings my organization requires.注意:这些是我的组织需要的设置。 You might have to tweak them around according to your exact issue.您可能必须根据您的确切问题调整它们。

Okey, i just updated git for windows git update-git-for-windows with git bash. Okey, i just updated git for windows git update-git-for-windows with git bash. Then selected the new non deprecated credential manager when installing and now it works fine.然后在安装时选择新的非弃用凭据管理器,现在它工作正常。

Check your credentials in Tools > Options > Source Control > Git Global Settings在工具 > 选项 > 源代码管理 > Git 全局设置中检查您的凭据在此处输入图像描述

Install the latest version of Git Credential Manager to resolve this issue.安装最新版本的Git 凭据管理器可解决此问题。

Windows: Windows:

Download here and install, it does not require admin access. 在此处下载并安装,它不需要管理员访问权限。

MacOS Homebrew: MacOS 自制软件:

To install, run the following:要安装,请运行以下命令:

brew tap microsoft/git
brew install --cask git-credential-manager-core

After installing you can stay up-to-date with new releases by running:安装后,您可以通过运行以下命令来了解最新版本:

brew upgrade git-credential-manager-core

Linux Debian package (.deb): Linux Debian package (.deb):

Download the latest .deb package , and run the following:下载最新的.deb package ,然后运行以下命令:

sudo dpkg -i <path-to-package>
git-credential-manager-core configure

Note that Linux distributions require additional configuration to use GCM Core.请注意,Linux 发行版需要额外配置才能使用 GCM 核心。

Linux tarball (.tar.gz): Linux 压缩包(.tar.gz):

Download the latest tarball , and run the following:下载最新的tarball并运行以下命令:

tar -xvf <path-to-tarball> -C /usr/local/bin
git-credential-manager-core configure

Latest Releases : https://github.com/microsoft/Git-Credential-Manager-Core/releases/最新版本https://github.com/microsoft/Git-Credential-Manager-Core/releases/

IDE-agnostic solution that worked for me:对我有用的与 IDE 无关的解决方案:

  1. Open Command Prompt打开命令提示符
  2. Run git config --global credential.useHttpPath true (the --global parameter is optional)运行git config --global credential.useHttpPath true ( --global参数是可选的)

Git-Credential-Manager-for-Windows docs Git-Credential-Manager-for-Windows 文档使用HttpPath

I encountered this error and I was able to resolve it by installing the latest version of gcm-core .我遇到了这个错误,我可以通过安装最新版本的gcm-core来解决它。

https://github.com/microsoft/Git-Credential-Manager-Core/releases https://github.com/microsoft/Git-Credential-Manager-Core/releases

Under Tools> Options > Source Control > Credential Helper Select GMC for windows在工具 > 选项 > 源代码管理 > 凭据帮助程序 Select GMC 下,用于 windows

VS have always being a pain with accounts VS 一直是账户的痛点

Sometimes, it happens if the git version is not updated with the latest version .有时,如果 git 版本未更新为最新版本,则会发生这种情况。

To update the git, just follow the below command depending on the type of OS you are using:要更新 git,只需根据您使用的操作系统类型执行以下命令:

Windows : git update-git-for-windows Windowsgit update-git-for-windows

Linux/Unix : git update Linux/Unixgit update

or follow the below link to get the latest copy of the git client for your OS.或按照以下链接获取适用于您的操作系统的 git 客户端的最新副本。

https://git-scm.com/downloads https://git-scm.com/downloads

Ok, so I encountered this problem today when I updated VS2019 to 16.9.6 (from 16.8.x).好的,所以今天我将VS2019更新到16.9.6(从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").我尝试了推荐的答案,但失败了 - 很奇怪,实际上,VS 拒绝坚持我对 GIT 全局设置的更改(让我在对话框中更改它们,但获取/推送仍然失败,当我再次查看设置时,他们又回到了“未设置”状态)。 I tried another answer above, updating gcm-core, but still made no difference.我在上面尝试了另一个答案,更新了 gcm-core,但仍然没有任何区别。 In the end I removed git entirely, then reinstalled the latest version (2.31.1) - and suddenly it worked.最后,我完全删除了 git,然后重新安装了最新版本(2.31.1) - 突然它起作用了。

Since I was so frustrated by this experience, I thought I'd post what finally worked for me, in case it helps someone else.由于我对这次经历感到非常沮丧,我想我会发布最终对我有用的东西,以防它帮助别人。

Installing the latest version of Git Credential Manager Core resolved the issue安装最新版本的Git Credential Manager Core解决了该问题

None of the non-nuclear options (settings, new GCM, updating git for Windows) worked for me.没有一个非核选项(设置、新 GCM、更新 Windows 的 git)对我有用。 I had to re-clone to get past these errors.我不得不重新克隆以克服这些错误。

Hi I use SourceTree and have same error message, I resolved it by changing:嗨,我使用 SourceTree 并有相同的错误消息,我通过更改解决了它:

Open Settings / Remotes, and click edit button.打开设置/遥控器,然后单击编辑按钮。 Change:改变:

https://[your-company-name] .visualstudio.com /[path-to-repo] https://[your-company-name] .visualstudio.com /[path-to-repo]

to

https://[your-company-name] @dev.azure.com /[path-to-repo] https://[your-company-name] @dev.azure.com /[path-to-repo]

I use SourceTree and the above responses didn't help on their own, until I clicked SourceTree -> Tools -> Options -> Git -> Git Version -> System.我使用 SourceTree 并且上述响应没有帮助,直到我单击 SourceTree -> 工具 -> 选项 -> Git -> Git 版本 -> 系统。 This switches SourceTree from using the embedded Git to using system Git.这会将 SourceTree 从使用嵌入式 Git 切换到使用系统 Git。 This can introduce other issues of compatibility, but fixed the problem in question for me and works fine for now.这可能会引入其他兼容性问题,但为我解决了相关问题并且现在可以正常工作。

I had the same issue when using the source tree on windows laptop.在 windows 笔记本电脑上使用源代码树时,我遇到了同样的问题。

Sometimes multiple Git versions running on the same machine could create issues.有时在同一台机器上运行多个 Git 版本可能会产生问题。

Simply open Source Tree Select Tools->Options->Git只需打开源代码树 Select Tools->Options->Git

Scroll down and under "Git Version" select System.向下滚动并在“Git 版本”select 系统下。

it will solve the issue.它会解决这个问题。

In Visual Studio Code you don't have the option of Tools > Options > Source Control > Git Global Settings Open a GIT bash (installed with Git Credential Manager for Windows enabled), and run在 Visual Studio Code 中,您没有工具 > 选项 > 源代码管理 > Git 全局设置的选项 打开 GIT bash(安装了 Git 启用 Windows 的凭据管理器),然后运行

git config credential.useHttpPath true

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 fatal: unable to access 'https://dev.azure.com/xxx': OpenSSL SSL_connect: Connection was reset in connection to dev.azure.com:443 - fatal: unable to access 'https://dev.azure.com/xxx': OpenSSL SSL_connect: Connection was reset in connection to dev.azure.com:443 Git 身份验证错误 dev.azure.com - 但适用于 visualstudio.com - Git Auth Error dev.azure.com - But Works on visualstudio.com 运行 go mod 时出现错误,例如无法连接到 dev.azure.com? - Getting error while running go mod tidy like unable to connect to dev.azure.com? git 克隆(使用 ssh)来自 dev.azure.com 突然要求输入密码 - git clone (using ssh) from dev.azure.com suddenly asks for password Fastlane 设置 - 致命:无法读取“https://”的密码<org> @dev.azure.com':终端提示已禁用</org> - Fastlane setup - fatal: could not read Password for 'https://<org>@dev.azure.com': terminal prompts disabled 如何从其 URL 确定 git 远程的“名称”? - How to determine the “name” of a git remote, from its URL? 如何通过提供 repo URL 来确定 git 远程名称? - How to determine git remote name by giving the repo URL? 确定远程存储库的URL - Determine the URL of a remote repository 如何确定远程git仓库的URL? - How do determine the URL of a remote git repo? Visual Studio - Azure 开发:未能将分支推送到远程存储库 - Visual Studio - Azure Dev : failed to push the branch to the remote repository
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM