git-credential-manager icon indicating copy to clipboard operation
git-credential-manager copied to clipboard

vs code Device Code Flow Alternatvie

Open paulgmiller opened this issue 3 weeks ago • 3 comments

I've been using GCM on an ssh linux with pass+az login for years but recently device code flow was locked down inside microsoft effectively breaking it. VSCode ssh extension has been improved so that az login automatically port forwrds.

Could GCM be configured to call az login equivalent to az login --use-device-code and let vscode do its magic?

There are some alternatives being bandied about but require manual port forwarding which is less user firendly https://github.com/phealy/azure-cli-extensions

paulgmiller avatar Dec 05 '25 18:12 paulgmiller

Another option https://gist.github.com/phealy/d4606563101b6f50b572a5934f74336e but having something "upstream " would be good here.

paulgmiller avatar Dec 05 '25 19:12 paulgmiller

Another option out there is

Could use go install github.com/hickford/git-credential-azure@latest git config --global credential.helper "cache --timeout 21600" git config --global --add credential.helper "azure " git config --global credential.useHttpPath true git config --global url."https://dev.azure.com/msazure/".insteadof
"https://msazure.visualstudio.com/DefaultCollection/"

But again not upstream.

paulgmiller avatar Dec 05 '25 21:12 paulgmiller

I think that ideally we'd just implement using AzureCliCredential to get the token any time GCM needs one and rely on regular Git caching.

phealy avatar Dec 08 '25 14:12 phealy

I've been using GCM on an ssh linux with pass+az login for years but recently device code flow was locked down inside microsoft effectively breaking it. VSCode ssh extension has been improved so that az login automatically port forwrds.

Could GCM be configured to call az login equivalent to az login --use-device-code and let vscode do its magic?

There are some alternatives being bandied about but require manual port forwarding which is less user firendly https://github.com/phealy/azure-cli-extensions

zanllan23-dev avatar Dec 11 '25 16:12 zanllan23-dev