microsoft/VFSForGit

GVFS clone failure to read creds from windows credential manager with latest git on vm?

ranavale opened this issue · 1 comments

Hi,

Currently I am using (unattended execution) GVFS clone a repo in a "Microsoft DevBox VM", at request time, as system account, before user login to it. I am trying upgrade the GVFS and git version installed on VM but this is causing gvfs clone to fail with authentication issues.
There were no other changes made other than just installing the later Git version.

Details
Currently, the unattended setup works fine with below versions on VM

Updating Git to any later version causses authentication issues. such as Git v2.45.2.vfs.0.1, v2.45.0.vfs.0.0, v2.43.0.vfs.0.0

Authenticating...\
Authenticating...\
Authenticating...-
Authenticating...-
Authenticating.../
Authenticating.../
Authenticating...|
Authenticating...|
Authenticating...\
Authenticating...Failed. Run 'gvfs log E:\repo' for more info.
Cannot clone because authentication failed: bash.exe: warning: could not find /tmp, please create!
fatal: Cannot prompt because terminal prompts have been disabled.
fatal: could not read Username for '<REDACTED-REPO-URL>': terminal prompts disabled

NOTE: I am adding Username, PAT and Target of repo in the windows credential manager just before trying to gvfs clone the repo. So I am assuming here that the credentials are never cached.

Is there any configuration updates or settings I need to update to make sure the existing flow is not broken?

I resolved the issues by updating git config as below just before using gvfs clone.

git config --global credential.azreposCredentialType pat

This made sure the unattended gvfs clone consumed the credentials from windows credential manager.