Skip to content

Commit 49345c1

Browse files
authored
GCM 2.1.2 (#1247)
**Changes since 2.1.1:** - Enable Azure Repos OAuth-mode by default on DevBox (#1245)
2 parents ca22bd8 + f9dde2e commit 49345c1

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.1.1.0
1+
2.1.2.0

docs/configuration.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -751,11 +751,13 @@ Credential: "git:https://[email protected]/example/myrepo" (user = bob)
751751

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

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

756758
Value|Description
757759
-|-
758-
`pat` _(default)_|Azure DevOps personal access tokens
760+
`pat`|Azure DevOps personal access tokens
759761
`oauth`|Microsoft identity OAuth tokens (AAD or MSA tokens)
760762

761763
Here is more information about [Azure Access tokens][azure-tokens].

docs/environment.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -840,11 +840,13 @@ export GCM_MSAUTH_USEDEFAULTACCOUNT="false"
840840

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

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

845847
Value|Description
846848
-|-
847-
`pat` _(default)_|Azure DevOps personal access tokens
849+
`pat`|Azure DevOps personal access tokens
848850
`oauth`|Microsoft identity OAuth tokens (AAD or MSA tokens)
849851

850852
More information about Azure Access tokens can be found [here][azure-access-tokens].

src/shared/Microsoft.AzureRepos/AzureReposHostProvider.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,8 @@ private static string GetAccountNameForCredentialQuery(InputArguments input)
391391
/// <returns>True if Personal Access Tokens should be used, false otherwise.</returns>
392392
private bool UsePersonalAccessTokens()
393393
{
394-
// Default to using PATs
395-
const bool defaultValue = true;
394+
// Default to using PATs except on DevBox where we prefer OAuth tokens
395+
bool defaultValue = !PlatformUtils.IsDevBox();
396396

397397
if (_context.Settings.TryGetSetting(
398398
AzureDevOpsConstants.EnvironmentVariables.CredentialType,

0 commit comments

Comments
 (0)