iterative/scmrepo

credentials: support azure repos in credential helpers

Closed this issue · 3 comments

GH/Microsoft GCM has hard coded rules to handle azure repos (which need useHttpPath = true) regardless of the config settings, we probably need something similar

This issue is actually specific to credential helpers in windows git-bash. (Azure repos work as expected with the ms/github GCM in powershell or cmd.exe)

In newer windows git releases, the git-bash git binary is located in C:\Program Files\git\mingw64\bin\git.exe, and the standard windows (powershell/cmd.exe) binary is located in C:\Program Files\git\bin\git.exe. Both builds actually use a single system git config dir located at C:\Program Files\git\etc, but dulwich ends up looking in C:\Program Files\git\mingw64\etc inside git-bash, so it cannot find the system level gitconfig (which is where the Microsoft/GitHub GCM gets configured)

The "intended" way for this to work would be for DVC to just look in the mingw/msys /etc/ (which gets set to the correct C:\Program Files\git\etc location. But depending on the way the windows machine is configured, the user is more likely running a native windows python build (which shows up as windows) and not a mingw python build (which would show up as posix).

upstream PR: jelmer/dulwich#1194

minow2 commented

on my side when i work with git-bash it seems to work with the GCM sine it does not prompt me for credentials again, and when using powershell it does prompt for credentials on the CLI, does not open any browser interface.