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

Question

So I just updated to a new Visual Studio version and I am no longer able to push/pull from/to my Azure 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.

Answer

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://learn.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.

Clone A Private Repository (Github)

How can I undo a `git commit` locally and on a remote after `git push`