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

Viewed 112954

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).

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'.

and only the pull command shows me this error, all the others are failing with git fatal error. I messed with my Credentials Manager cos i suspected it might be the one causing the problem but no luck..

9 Answers

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":

  • Prune remote branches during fetch - False
  • Rebase local branch when pulling - False
  • Cryptographic network provider - OpenSSL
  • Credential helper - GCM Core

Source: 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. 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 enter image description here

Under Tools> Options > Source Control > Credential Helper Select GMC for windows

VS have always being a pain with accounts

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.

Since I was so frustrated by this experience, I thought I'd post what finally worked for me, in case it helps someone else.

Hi I use SourceTree and have same error message, I resolved it by changing:

Open Settings / Remotes, and click edit button. Change:

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

to

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. This switches SourceTree from using the embedded Git to using system Git. This can introduce other issues of compatibility, but fixed the problem in question for me and works fine for now.

Related