315

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.

9
  • 2
    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. Commented Mar 15, 2021 at 6:50
  • @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) Commented Mar 15, 2021 at 8:54
  • 1
    Same issue with Visual Studio Professional 2019 Version 16.9.2 -- setting the Credential helper - GCM Core setting in Valentin Atanasov's answer fixed it for me. Commented Mar 17, 2021 at 16:03
  • 1
    And again when upgrading to VS 2022 when getting a new PC and installing the latest version of the software Commented Jan 26, 2022 at 23:19
  • 1
    Check your git version. As stated by Microsoft: Unset (default): If this setting is unset, the credential helper set in the system config is used. As of Git for Windows 2.29, the default credential helper is GCM Core. Commented Feb 21, 2022 at 11:18

11 Answers 11

615
Answer recommended by Microsoft Azure Collective

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.

Sign up to request clarification or add additional context in comments.

17 Comments

I guess that is the key Credential helper - GCM Core, which the update automatically sets
I can confirm it is the Credential helper - I left everything else untouched and it resolved the issue.
It worked perfect for me, the error message started after the update to the version 16.9.1
I actually used GCM Windows and it fixed also
Just here to echo what others said in regards to it being the Credential Helper that was the issue here. Except mine was already set to GCM Core (not Unset). Changing it to GCM for Windows resolved the problem
|
112

IDE-agnostic solution that worked for me:

  1. Open Command Prompt
  2. Run git config --global credential.useHttpPath true (the --global parameter is optional)

Git-Credential-Manager-for-Windows docs useHttpPath

5 Comments

This fixed the issue for me. The other changes (upgrading git and changing values in Tools > Options > Source Control > Git Global Settings did not fix the problem until I executed the git config command shown in this answer.
Thanks. This was the solution for me as well. Probably works since I have git installed "outside" Visual Studio
The setting can be specific to Azure Repos git config --global credential.https://dev.azure.com.useHttpPath true Source
Worked for me as well, everything was fine (in the Java world) until I made the mistake of playing with VS Code, it recommended (wrongly) that I update GIT, I did so and it broke Git :-/
this needs to be upvoted to the top
73

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

5 Comments

Hi, Thanks for the sharing, you could Accept it as an Answer , it could help other community members who get the same issues and we could archive this thread. Thanks. Have a nice day. :)
I am using commandline but could you provide more details about this fix? git-for-windows is up-to-date, how do I find out the deprecated credential manager, and how to switch to the fixed one? Thanks.
@MarcVitalis I uninstalled and installed it back. Then there's an option to choose the new credential manager.
I was getting error but remote branch reflected all of my changes too, updating git with new credential manager resolved it.
Apparently, when you update git (mine through scoop) it reverts back the `gcm-core to older versions. Just go to the releases website, and install the latest update and it should work fine.
31

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

1 Comment

Setting the Credential helper to GCM for Windows solved the problem for me
15

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

1 Comment

I had Git installed by scoop. Even though it has the latest version of GCM Core bundled, that version doesn't work properly. A separate install of GCM Core solved the problem.
12

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

VS have always being a pain with accounts

Comments

12

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

git config credential.useHttpPath true

1 Comment

Thanks. It worked. Had the same issue with Tower. Had to switch to Git for windows binary, installed with GCM enabled, then open git terminal from Tower, and then run the above command and then run git fetch to test in the same terminal.
4

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.

Comments

3

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.

Comments

3

I had the same issue when using the source tree on windows laptop.

Sometimes multiple Git versions running on the same machine could create issues.

Simply open Source Tree Select Tools->Options->Git

Scroll down and under "Git Version" select System.

it will solve the issue.

Comments

0

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]

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.