Skip to content

Commit

Permalink
GVFSVerb: Use OAuth credentials by default
Browse files Browse the repository at this point in the history
To more rapidly adopt OAuth tokens, set that as the default for GVFS
repos. This will update on mount, so all users will update to this mode
when they upgrade to a version including this commit.

This may cause some initial frustration as the first time I ran a fetch
in OAuth mode my local clone had a failure with GCM and defaulted to
username/password checks over command line. The second fetch worked just
fine, though.
  • Loading branch information
derrickstolee authored and tyrielv committed Feb 15, 2024
1 parent 90cf37d commit cbd0cef
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions GVFS/GVFS/CommandLine/GVFSVerb.cs
Expand Up @@ -312,6 +312,11 @@ public static bool TrySetRequiredGitConfigSettings(Enlistment enlistment)

// Disable the builtin FS Monitor in case it was enabled globally.
{ "core.useBuiltinFSMonitor", "false" },

// Set the GCM credential method to use OAuth tokens.
// See https://github.com/git-ecosystem/git-credential-manager/blob/release/docs/configuration.md#credentialazreposcredentialtype
// for more information.
{ "credential.azreposCredentialType", "oauth" },
};

if (!TrySetConfig(enlistment, requiredSettings, isRequired: true))
Expand Down

0 comments on commit cbd0cef

Please sign in to comment.