Skip to content

Commit

Permalink
GCM 2.1.2 (#1247)
Browse files Browse the repository at this point in the history
**Changes since 2.1.1:**

- Enable Azure Repos OAuth-mode by default on DevBox (#1245)
  • Loading branch information
mjcheetham committed May 10, 2023
2 parents ca22bd8 + f9dde2e commit 49345c1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.1.0
2.1.2.0
6 changes: 4 additions & 2 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -751,11 +751,13 @@ Credential: "git:https://bob@github.com/example/myrepo" (user = bob)

Specify the type of credential the Azure Repos host provider should return.

Defaults to the value `pat`.
Defaults to the value `pat`. In certain cloud hosted environments when using a
work or school account, such as [Microsoft DevBox][devbox], the default value is
`oauth`.

Value|Description
-|-
`pat` _(default)_|Azure DevOps personal access tokens
`pat`|Azure DevOps personal access tokens
`oauth`|Microsoft identity OAuth tokens (AAD or MSA tokens)

Here is more information about [Azure Access tokens][azure-tokens].
Expand Down
6 changes: 4 additions & 2 deletions docs/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -840,11 +840,13 @@ export GCM_MSAUTH_USEDEFAULTACCOUNT="false"

Specify the type of credential the Azure Repos host provider should return.

Defaults to the value `pat`.
Defaults to the value `pat`. In certain cloud hosted environments when using a
work or school account, such as [Microsoft DevBox][devbox], the default value is
`oauth`.

Value|Description
-|-
`pat` _(default)_|Azure DevOps personal access tokens
`pat`|Azure DevOps personal access tokens
`oauth`|Microsoft identity OAuth tokens (AAD or MSA tokens)

More information about Azure Access tokens can be found [here][azure-access-tokens].
Expand Down
4 changes: 2 additions & 2 deletions src/shared/Microsoft.AzureRepos/AzureReposHostProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,8 @@ private static string GetAccountNameForCredentialQuery(InputArguments input)
/// <returns>True if Personal Access Tokens should be used, false otherwise.</returns>
private bool UsePersonalAccessTokens()
{
// Default to using PATs
const bool defaultValue = true;
// Default to using PATs except on DevBox where we prefer OAuth tokens
bool defaultValue = !PlatformUtils.IsDevBox();

if (_context.Settings.TryGetSetting(
AzureDevOpsConstants.EnvironmentVariables.CredentialType,
Expand Down

0 comments on commit 49345c1

Please sign in to comment.