103
votes

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

7
Thanks for this, I hunted for any solution over the week end and came up with nothing. Do you know if this change in the credential manager (whatever that is) is associated with the most recent VS 2019 update which I took last week? I am now on version 16.9.1.Peter
@Peter Yes i'm kinda certain in it cos i updated VS some day ago, and yesterday before pushing to my branch i decided to update to the latest one again hoping a strange warning message would dissapear :D. Well this little manoeuvre took me like 2 hours lol (I'm also on 16.9.1, found non in the issue tracker that might cause this issue tho)Menyus
I had the same issue with VS Studio Profesional 2019 Version 16.9.1 (latest update for March 2021)Carlos Bolivar
Same issue with VS Studio Community Edition 2019 Version 16.9.1Tich -- Lil3p
Same issue with Visual Studio Professional 2019 Version 16.9.1Nicolay

7 Answers

187
votes

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.

41
votes

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.

7
votes

I encountered this error and I was able to resolve it by installing the latest version of gcm-core.

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

3
votes

Check your credentials in Tools > Options > Source Control > Git Global Settings enter image description here

2
votes

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.

2
votes

Install the latest version of Git Credential Manager Core to resolve this issue.

Windows: Download here and install, it does not require admin access.

macOS Homebrew:

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

Download the latest .deb package, and run the following:

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

Note that Linux distributions require additional configuration to use GCM Core.

Linux tarball (.tar.gz):

Download the latest tarball, and run the following:

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

Installing the latest version of Git Credential Manager Core resolved the issue