Skip to content

build: rework the build system and project layout - #2367

Merged
mjcheetham merged 27 commits into
git-ecosystem:vnextfrom
mjcheetham:newbuild
Jul 7, 2026
Merged

mjcheetham merged 27 commits into
git-ecosystem:vnextfrom
mjcheetham:newbuild

Conversation

@mjcheetham

Copy link
Copy Markdown
Contributor

Summary

A top-to-bottom rework of how the repository is laid out and built. Flattens the src/shared tree into src/, renames the executable to git-credential-manager, and replaces the per-platform packaging projects with a uniform build/<os> layout driven by thin scripts over a
shared CLI scripting library. Migrates the solution to SLNX, adopts the .NET 10 artifacts-output layout, refreshes CI and docs, and restores the .NET tool package.

Why

The src/{windows,osx,linux} + src/shared split is a relic from when code was platform-partitioned. Every library is cross-platform now, so the structure only adds noise, and the old monolithic layout.sh / pack.sh packaging was hard to follow and inconsistent across platforms. This branch makes the layout flat and the packaging uniform, and brings the build onto current .NET conventions (SLNX, UseArtifactsOutput, NoTargets distribution projects).

What changes

Project layout

  • Flatten all libraries and tests up one level into src/ (pure move — identical assemblies); relocate the scoped Directory.Build.props.
  • Rename the executable project Git-Credential-Manager → git-credential-manager so project, directory and output binary all match the command name.
  • Move the MSBuild tasks under build/msbuild (renamed MSBuildTasks).

Packaging (uniform build/<os>)

  • Add shared CLI scripting libraries (lib-cli.sh, lib-cli.psm1): logging, path/version/config resolution, flag parsing.
  • Rework Linux, macOS and Windows packaging into build/<os> with a *.Distribution.csproj (NoTargets) anchoring each in the solution plus thin publish / pack / archive scripts.
  • Bump Inno Setup to 6.7.3; fetch the compiler on demand via a download helper instead of from the NuGet package path.

Solution & .NET 10 config

  • Migrate to the SLNX solution format (terser, merges cleanly, no GUID bookkeeping); rename the ReSharper DotSettings sidecar to match.
  • Adopt UseArtifactsOutput (everything under out/), default to net10.0, bump the SDK to 10.0, register Microsoft.Build.NoTargets, normalise VERSION.
  • Mark the three *.Distribution.csproj <Build Project="false" /> so a plain dotnet build/dotnet test builds only the product and tests — no accidental publish-and-package side effects. They still build directly via dotnet build build/<os>.

install-from-source

  • Promote the Linux-only script to a cross-platform build/install-from-source.sh: detect OS, bootstrap deps, publish via the per-OS script, stage under <prefix>/share/gcm-core with a <prefix>/bin launcher symlink.
  • Default to a trimmed, self-contained non-AOT build (needs only the .NET SDK); --aot opts into the native toolchain. sudo only when the prefix isn't writable. Fixes two latent bugs from the old script (multi-SDK detection, cwd change breaking repo detection).
  • Add a --aot / --no-aot toggle to the publish scripts (defaults to AOT, so the shipped package is unchanged).

.NET tool

  • Restore git-credential-manager .NET tool packaging under build/dntool (framework-dependent IL; pack the code-signed layout with --no-build).

CI & docs

  • Point Azure Pipelines and GitHub Actions at the new build/ entry points and flattened paths; add the ESRP sign.yml template; add jobs to build and (on release) sign + publish the .NET tool; validate install-from-source on the new path and on macOS.
  • Refresh the development guide for the new layout and outputs; document building each platform's distributables and the .NET tool; note the Homebrew-SDK Native-AOT link caveat.

Notes

  • Despite the size, the change is overwhelmingly moves, renames and build plumbing; library contents and the produced binaries are unchanged.
  • A solution build no longer triggers packaging — produce distributables with dotnet build build/<os>.

Testing

  • dotnet build git-credential-manager.slnx (product + tests only)
  • Core + platform test suites
  • Distribution builds via dotnet build build/<os>
  • install-from-source validated on Linux matrix + macOS

Requires PR #2366 to be completed first.

@mjcheetham mjcheetham added engineering Refactoring or build changes gcm3.0 Targets the next major release of Git Credential Manager - v3.0 labels Jun 29, 2026
@mjcheetham mjcheetham changed the title build: rework the build system and project lay build: rework the build system and project layout Jun 29, 2026
@mjcheetham
mjcheetham force-pushed the newbuild branch 10 times, most recently from 6a83662 to e663c88 Compare June 30, 2026 14:27
@mjcheetham
mjcheetham marked this pull request as ready for review June 30, 2026 15:29
@mjcheetham
mjcheetham requested review from a team as code owners June 30, 2026 15:29
mjcheetham added 12 commits July 6, 2026 16:31
The src/shared directory is a relic of when code was split between
platform-specific src/{windows,osx,linux} trees and a separate shared
tree. Every library and test project is cross-platform now, so the
extra "shared" level only adds noise to project paths and solution
entries.

Lift all libraries and their test projects up one level into src/.
This is a pure move: project contents and their relative references to
one another are unchanged, so the assemblies that get built are
identical.

Assisted-by: Claude Opus 4.8
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
With the shared projects flattened into src/, move the
Directory.Build.props that scoped them up to src/ so it keeps applying
to exactly the same set of projects.

Drop the manual PlatformOutPath/BaseOutputPath overrides while here:
output redirection is being centralized via UseArtifactsOutput in the
root props (see later commit), so per-tree output paths are no longer
needed. Only the chained import of the repository-root props remains.

Assisted-by: Claude Opus 4.8
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Rename the executable project from Git-Credential-Manager to
git-credential-manager so the project, its directory and the output
binary all match the git-credential-manager command name and the
lowercase naming used across the rest of the build.

This is a pure move; the project file is unchanged apart from its
path and filename casing.

Assisted-by: Claude Opus 4.8
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
The DotnetTool project existed only to repackage the executable as a
.NET tool, carrying its own csproj, DotnetToolSettings.xml, nuspec and
layout/pack scripts alongside the real project.

Its packaging responsibilities move into the reworked build system
introduced in the following commits, so remove the project. Preserve the
tool icon by moving it next to the executable project.

Assisted-by: Claude Opus 4.8
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Collect the custom MSBuild tasks - GetVersion and
GenerateWindowsAppManifest - together with their project and the .tasks
import file under a dedicated build/msbuild/ directory, and rename the
project to MSBuildTasks.

This frees the top level of build/ for the platform packaging that
follows and gives the tasks assembly a clearer home. Point the root
Directory.Build.targets at the new import path and thread a
VersionOverride through to the GetVersion task.

Assisted-by: Claude Opus 4.8
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Add lib-cli.sh and its PowerShell counterpart lib-cli.psm1: small
helper libraries that the per-platform build/publish/pack/archive scripts
introduced next will source. They centralise logging, repository and
artifacts path resolution, and runtime/version/configuration
normalisation (plus Inno Setup discovery on Windows).

Keeping this logic in one place per shell keeps the platform scripts
thin and consistent, and gives them a single source of truth for things
like the verbose-output flag and the out/ layout.

Assisted-by: Claude Opus 4.8
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Replace the old src/linux/Packaging.Linux project and its
build/layout/pack scripts with a build/linux layout. A
Linux.Distribution.csproj (a NoTargets project) anchors packaging in the
solution, while thin publish/pack/archive scripts built on the shared
lib-cli library do the actual work, replacing the previous monolithic
layout.sh and pack.sh.

This allows for two ways to build the Linux packages:

1. MSBuild integrated - nicer dev UX
   `dotnet build build/linux` which links into the `build.sh` script,
    which itself orchestrates the publish/pack/archive scripts.
   Devs can build this from inside of their IDE or using familiar and
   simple `dotnet` commands.

2. Shell scripts - phase-by-phase for manual control
   This allows us full control of the build process, and for CI to
   inject extra steps at key points, or redirect input/output files.

The Debian control file moves under debian-package/, and
install-from-source.sh carries over unchanged.

Assisted-by: Claude Opus 4.8
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Replace src/osx/Installer.Mac with a build/macos layout mirroring the
Linux one: a Mac.Distribution.csproj (NoTargets) plus
publish/pack/archive/codesign scripts and an import-developer-certificate
helper, all built on the shared lib-cli library. This subsumes the old
build/layout/pack/dist/notarize/codesign scripts.

This again allows us to build either via MSBuild/dotnet or via shell
script directly.

The installer's distribution XML, resources, postinstall script,
entitlements and uninstall.sh move under build/macos, with the .pkg
pieces grouped under installer/.

Assisted-by: Claude Opus 4.8
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Replace src/windows/Installer.Windows with a build/windows layout
matching the other platforms: a Windows.Distribution.csproj (NoTargets)
plus publish/pack/archive PowerShell scripts built on lib-cli.psm1, and a
download-innosetup helper that fetches the Inno Setup compiler on demand.
The Setup.iss installer script moves under installer/.

Again we can now build easily and simply via `dotnet build build/windows`
or CI can call the ps1 scripts directly for full control.

Bump the Inno Setup package to 6.7.3 and drop its now-unused
GeneratePathProperty: the compiler is resolved by the download helper at
build time rather than from the NuGet package path.

Assisted-by: Claude Opus 4.8
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Replace the legacy MSBuild .sln with the newer .slnx solution format.
SLNX is terser, diffs and merges far more cleanly, and lists projects by
path without the GUID bookkeeping of the old format. The new solution
references the flattened src/ projects and the build/ distribution
projects in their new homes.

Rename the ReSharper DotSettings sidecar to match the new lowercase
solution name so it keeps applying.

Assisted-by: Claude Opus 4.8
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Turn on `UseArtifactsOutput` so every project's binaries and
intermediates land under `out/` in the standard .NET artifacts layout
(replacing the per-tree output paths removed earlier), and default all
projects to `net10.0` - individual projects may still override.

Bump the SDK in global.json to 10.0 and register the
Microsoft.Build.NoTargets MSBuild SDK used by the new distribution
projects. Normalise VERSION to the three-part 3.0.0.

Assisted-by: Claude Opus 4.8
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Point the Azure Pipelines release definition and the GitHub Actions
workflows at the new build/ script entry points (publish/pack/archive,
import-developer-certificate) and the flattened project paths, replacing
references to the old src/{linux,osx,windows} packaging projects and
scripts.

Add the ESRP sign.yml template that the release pipeline invokes to
code-sign the Windows and macOS artifacts.

Assisted-by: Claude Opus 4.8
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
mjcheetham added 15 commits July 6, 2026 16:31
Refresh the development guide to match the reworked build: refer to
git-credential-manager.slnx, document building each platform's
distributables through the build/<os> projects with --configuration and
--runtime, and point at the new out/package and out/publish output
locations.

Add a note explaining why building the macOS distribution with
Homebrew's non-portable .NET SDK fails at the Native AOT link step, and
recommend using the official SDK instead.

Assisted-by: Claude Opus 4.8
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
The Linux, Mac and Windows *.Distribution.csproj projects each run
their platform build.sh / publish pipeline from a target that fires
AfterTargets="Build". Because they sat in the solution default build
set, a plain `dotnet build` (or `dotnet test`) on
git-credential-manager.slnx kicked off the full publish-and-package
pipeline on the matching OS - slow, and with side effects no inner-loop
build should have.

Mark the three distribution projects with <Build Project="false" />
so a solution build covers just the product and its tests. They stay in
the solution (visible and loadable in IDEs) and are still built directly
via `dotnet build build/<os>`, which is how CI and a deliberate
distribution build invoke them. Devs can also manually request a build
of the specific build project from their IDE.

Assisted-by: Claude Opus 4.8
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Publishing always produced an ahead-of-time (AOT) build, since the
project sets PublishAot=true. AOT needs a native toolchain (clang, zlib)
to link, which is fine for the shipped package but a heavy requirement
for building from source.

Add an --aot / --no-aot toggle to the Linux and macOS publish.sh
scripts (and an equivalent -Aot switch to the Windows publish.ps1),
defaulting to AOT so the shipped package is unchanged. --no-aot publishes
a trimmed, self-contained build that needs only the .NET SDK.

The boolean --x / --no-x parsing lives in a new bool_flag helper in
lib-cli.sh for reuse. Trimming for the non-AOT build is configured in the
project (PublishTrimmed, gated on PublishAot being off) rather than passed
on the command line; the product is already AOT-safe, hence trim-safe.

Assisted-by: Claude Opus 4.8
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
The Linux install-from-source script built through the deleted
src/linux/Packaging.Linux project (its InstallFromSource MSBuild path)
and detected a checkout using the old src/linux paths and the .sln file,
so it stopped working after the build-system rework.

Promote it to a single cross-platform build/install-from-source.sh:
detect the OS, bootstrap dependencies (Linux distro package managers, or
git plus the .NET SDK on macOS), publish through the per-OS
build/<os>/publish.sh, and stage the result under <prefix>/share/gcm-core
with a launcher symlink in <prefix>/bin - the same layout the .deb uses.

Default to a trimmed, self-contained non-AOT build (needs only the
.NET SDK); --aot opts into a native build (and the clang/zlib toolchain
on Linux). Elevate the install with sudo only when the prefix is not
writable, so user-prefix installs need no root.

Also fix two latent bugs carried over from the old script: the
SDK-detection test broke when multiple SDKs were installed (forcing a
needless dotnet re-download), and the dotnet bootstrap changed the
working directory, which broke repo detection.

Assisted-by: Claude Opus 4.8
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
The validate-install-from-source workflow invoked the script from its
old src/linux/Packaging.Linux location, which no longer exists after the
rework. Point it at the new build/install-from-source.sh.

Add a macOS job so the cross-platform script is exercised on macOS as
well as the Linux distro matrix. The default non-AOT build needs only the
.NET SDK, so it runs without a native toolchain on the runner.

Assisted-by: Claude Opus 4.8
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
The install-from-source script moved from src/linux/Packaging.Linux to
a cross-platform build/install-from-source.sh and gained an --aot toggle
that defaults to a trimmed, self-contained non-AOT build.

Fix the now-broken script link in the uninstall guide, document the
--aot option, and note that the script also runs on macOS.

Assisted-by: Claude Opus 4.8
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
The Install/Update/Uninstall subsections under the "## .NET tool"
heading were h4 (####) while their parent is h2, leaving a gap in the
heading hierarchy. Promote them to h3 (###) to match the sibling
sections.

Assisted-by: Claude Opus 4.8
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
The standalone DotnetTool project was dropped during the build-system
rework. Restore the ability to produce the git-credential-manager .NET tool
NuGet package, placing it under build/dntool to match the per-platform build
layout.

publish.sh publishes the application as portable, framework-dependent IL
(no AOT, trimming, runtime identifier or apphost); pack.sh then runs dotnet
pack with the no-build option, pointing PublishDir at the published layout so
that assemblies code-signed between the two steps are packaged as-is. The SDK
generates DotnetToolSettings.xml and a symbol package, so no hand-written
nuspec is required.

Dntool.Distribution.csproj is a NoTargets project that carries only the
tool and package metadata; it is driven by the scripts and marked no-build in
the solution, like the other distribution projects.

Assisted-by: Claude Opus 4.8
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Add a job to the CI workflow that builds the git-credential-manager .NET
tool package (unsigned) via build/dntool/build.sh and uploads the resulting
.nupkg, so the tool packaging is exercised on every push alongside the
per-platform distributables.

Assisted-by: Claude Opus 4.8
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
The .NET tool was dropped from the release pipeline during the
build-system rework, leaving a commented stub that referenced the removed
src/shared/DotnetTool scripts.

Add a dotnet_tool build job that publishes the framework-dependent IL via
build/dntool/publish.sh, ESRP-signs the managed assemblies (SigntoolSign),
then packs the signed layout into the .nupkg via build/dntool/pack.sh.
Re-enable the NuGet publish job to push the package.

Since we're producing portable IL we don't need to build on any
particular platform. Run the job on the existing Linux pool as these agents
tend to be the fastest to spin-up.

Assisted-by: Claude Opus 4.8
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Add a .NET tool section to the development guide: how to build the package
with build/dntool/build.sh (it is script-built rather than via dotnet build,
being platform-agnostic) and how to install the result into an isolated tool
path to try it.

Assisted-by: Claude Opus 4.8
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
The Windows release jobs publish the executable with Native AOT, which
links the final binary with the MSVC linker (link.exe). The 1ES hosted
images do not ship the C++ toolchain, so every Windows leg fails with
"Platform linker not found" from Microsoft.NETCore.Native.Windows.targets.

Add a setup script that installs VS 2022 Build Tools with the single
VC.Tools component for the agent's architecture - x86.x64 on the Intel
legs (win-x86, win-x64), ARM64 on the ARM leg (win-arm64) - and run it
before the publish step.

Installing just the architecture's component keeps the download to the
minimum that still provides link.exe and the MSVC libraries; the .NET
ILCompiler then discovers the toolchain through the Visual Studio setup
API.

Assisted-by: Claude Opus 4.8
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
The `UseDotNet@2` task has no architecture input and mis-detects
Windows-on-ARM agents as win-x86, installing the 32-bit SDK.

Publishing win-arm64 from an x86 host is then treated as Native AOT
cross-compilation (only x64->arm64 is supported), so the ILCompiler step
fails demanding a runtime.win-arm64.Microsoft.DotNet.ILCompiler package.
The x86/x64 legs pass because they run on Intel agents, where the SDK
targets win-x64 natively and win-x86 via bundled cross-support.

Acquire the SDK with the official dotnet-install script instead, keyed
on the matrix leg's poolArch, so every Windows agent gets a host SDK
matching its architecture and publishes natively. The macOS and Linux
legs keep `UseDotNet@2`; the mis-detection is specific to Windows on
ARM.

Assisted-by: Claude Opus 4.8
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Explicitly use Central Feed Services (CFS) feeds for NuGet packages by
replacing the normal, nuget.org, config file in the repo root at the
start of the build jobs.

Run NuGetAuthenticate once at the start of each job that restores
(Windows, macOS, Linux, and the .NET tool packaging job) so every
subsequent dotnet restore/publish is authenticated. The release-stage
NuGet publish job is unaffected: it pushes via the 1ES service
connection rather than a restore.

Assisted-by: Claude Opus 4.8
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
The default 'minimal' MSBuild verbosity hides the restore, ILC, and
native link steps, which made failures like the Windows arm64 "platform
linker not found" error hard to diagnose from the pipeline logs alone.

Pass -v:normal to dotnet publish in each platform's publish script
(Windows, macOS, Linux, and the .NET tool) so the full toolchain
discovery and link output is captured in CI.

Assisted-by: Claude Opus 4.8
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>

@dscho dscho left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, what a big PR! I was scared of 27 commits that change 488 files, and while it took a while to review, the PR is well-structured, the commits tell a compelling story, and I joyfully approve!

Comment thread build/lib-cli.sh Resolved
Comment thread Directory.Packages.props Resolved
Comment thread docs/development.md Resolved
Comment thread build/linux/publish.sh Resolved
@mjcheetham
mjcheetham merged commit 048b1e2 into git-ecosystem:vnext Jul 7, 2026
27 checks passed
@mjcheetham
mjcheetham deleted the newbuild branch July 7, 2026 12:57
tak848 pushed a commit to tak848/dotfiles that referenced this pull request Oct 12, 2026
…nager to v3 (#981)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[github:git-ecosystem/git-credential-manager](https://redirect.github.com/git-ecosystem/git-credential-manager)
| tools | major | `v2.9.1` → `v3.0.1` |

---

### Release Notes

<details>
<summary>git-ecosystem/git-credential-manager
(github:git-ecosystem/git-credential-manager)</summary>

###
[`v3.0.1`](https://redirect.github.com/git-ecosystem/git-credential-manager/releases/tag/v3.0.1):
GCM 3.0.1

[Compare
Source](https://redirect.github.com/git-ecosystem/git-credential-manager/compare/v3.0.0...v3.0.1)

Git Credential Manager 3.0 brings native ahead-of-time compilation,
Microsoft authentication broker support across Windows, macOS, and
Linux, and a refreshed terminal experience.

### Changes since 3.0.0

- **(Bug fix)** Prompt for default OS account on Microsoft DevBox
([#&#8203;2459](https://redirect.github.com/git-ecosystem/git-credential-manager/issues/2459))
- **(Bug fix)** Restore Entra broker parent window handling
([#&#8203;2464](https://redirect.github.com/git-ecosystem/git-credential-manager/issues/2464))
- **(Feature)** Support `authtype` Git capability
([#&#8203;2457](https://redirect.github.com/git-ecosystem/git-credential-manager/issues/2457))
- **(Feature)** Add console parent window parenting for non-Entra UI
([#&#8203;2465](https://redirect.github.com/git-ecosystem/git-credential-manager/issues/2465))
- Drop Windows x86 release binaries
([#&#8203;2456](https://redirect.github.com/git-ecosystem/git-credential-manager/issues/2456))

**Changelog:** [v3.0.0...v3.0.1][point1-changelog]

### Changes since 2.9.1

> \[!IMPORTANT]
> This release changes supported operating systems and the default Azure
Repos authentication experience. Review the breaking changes before
upgrading.

#### Breaking changes and upgrade notes

##### Updated platform and .NET requirements

GCM now targets **.NET 10 on all platforms**. Windows builds no longer
use .NET Framework.

| Platform or installation method | Requirement |
| ------------------------------- |
--------------------------------------------------------- |
| Windows | Windows 10 or later; Windows Server 2016 or later |
| macOS | macOS 14 or later |
| Linux | A distribution supported by .NET 10 |
| .NET tool | Install the .NET 10 SDK before installing or updating GCM
|

See the [supported environments][supported-environments] and [.NET 10
support matrix][dotnet-support] for details. Standalone platform
packages do **not** require a separate .NET installation.

**Windows 7 and Windows 8.x are no longer supported by GCM 3.x.** GCM
2.9.x will receive minimal, security-only maintenance for those systems,
but no new features. Upgrading Windows is recommended.
([git-ecosystem/git-credential-manager#2365][pr-2365],
[git-ecosystem/git-credential-manager#2367][pr-2367])

##### Azure Repos uses OAuth tokens by default

GCM now returns Microsoft identity **OAuth tokens**, rather than
creating personal access tokens (PATs), by default for Azure Repos.
OAuth tokens are automatically refreshed as needed.

Explicit credential-type settings are still respected. If you need the
previous PAT behavior, set:

```shell
git config --global credential.azreposCredentialType pat
```

The equivalent environment variable is `GCM_AZREPOS_CREDENTIALTYPE=pat`.
See [Azure Repos users and tokens][azrepos-tokens].
([git-ecosystem/git-credential-manager#2449][pr-2449])

##### Microsoft authentication uses the OS broker by default

Broker integration is now enabled by default wherever supported, rather
than requiring an opt-in. This applies to Microsoft authentication, such
as Azure Repos; it does not change authentication for GitHub, Bitbucket,
or GitLab.

On macOS, broker authentication requires Company Portal and device
enrollment. On Linux, it requires the supported Intune setup, a GNOME
desktop, and Microsoft Edge; headless and WSL environments do not
support the Linux broker.

> \[!WARNING]
> Depending on your organization's policies, broker sign-in can prompt
you to join or enroll your device. On Windows, signing in with a
personal Microsoft account can also affect the account linked to your
local Windows user. Review the [broker documentation][broker] before
proceeding, especially on personal devices.

To opt out:

```shell
git config --global credential.msauthUseBroker false
```

The equivalent environment variable is `GCM_MSAUTH_USEBROKER=false`.
When the broker is in use, it takes precedence over
`credential.msauthFlow`.
([git-ecosystem/git-credential-manager#2449][pr-2449])

##### Azure Repos uses a dedicated GCM Entra application

GCM now signs in using its own first-party Microsoft Entra application
instead of the Visual Studio application. This enables broker support on
macOS and Linux, in addition to Windows.

If you encounter a client-application configuration error, GCM provides
guidance for retrying with the legacy application; it does **not**
silently switch back. For a one-command compatibility retry:

```shell
git -c credential.azreposUseLegacyClientId=true fetch
```

Please report the original failure if this workaround succeeds. The
legacy application does not support broker authentication on macOS or
Linux. Managed identity, service-principal, and workload-identity
federation flows are unaffected by the application change.

The undocumented developer overrides `credential.azreposDevClientId` and
`credential.azreposDevAuthorityBaseUri`, and their environment-variable
equivalents `GCM_DEV_AZREPOS_CLIENTID` and
`GCM_DEV_AZREPOS_AUTHORITYBASEURI`, have been removed. The
[legacy-client setting][legacy-client] is a focused compatibility
option, not an arbitrary client-ID or authority override.
([git-ecosystem/git-credential-manager#2416][pr-2416])

##### The embedded Microsoft sign-in web view has been removed

The Windows-only embedded web view depended on .NET Framework and is no
longer available. Use the broker, system browser, or device-code flow
instead. If you previously forced `credential.msauthFlow=embedded` or
`GCM_MSAUTH_FLOW=embedded`, change it to `auto`, `system`, or
`devicecode`. Disable broker integration as described above if you
specifically need to force a non-broker flow.
([git-ecosystem/git-credential-manager#2365][pr-2365])

##### Terminal and diagnostic output has changed

Terminal selection prompts now use arrow-key navigation instead of
numbered input, and `diagnose` has a new output format. Automation that
drives interactive menus or parses diagnostic text may need updating.
Git's credential-protocol input and output remain separate from
interactive prompts.
([git-ecosystem/git-credential-manager#2377][pr-2377],
[git-ecosystem/git-credential-manager#2425][pr-2425])

#### Features and improvements

- **Native ahead-of-time builds.** Published platform packages compile
GCM to native code to reduce startup overhead. The .NET tool remains a
framework-dependent distribution.
([git-ecosystem/git-credential-manager#2366][pr-2366],
[git-ecosystem/git-credential-manager#2367][pr-2367])
- **Cross-platform Microsoft single sign-on.** The authentication broker
can reuse OS accounts on supported Windows, macOS, and Linux
installations. When a default OS account can be used, GCM asks for
confirmation unless automatic use is explicitly enabled, or enabled by
default in environments such as Microsoft Dev Box. Set
`credential.msauthUseDefaultAccount=false` to skip the default-account
attempt. See the [broker documentation][broker].
([git-ecosystem/git-credential-manager#2379][pr-2379],
[git-ecosystem/git-credential-manager#2416][pr-2416])
- **Optional isolated Azure Repos token cache.** Set
`credential.azreposUseMicrosoftSharedCache=false`, or
`GCM_AZREPOS_USE_MSFT_CACHE=false`, to use a GCM-specific cache. Sharing
with other Microsoft developer tools remains the default.
([git-ecosystem/git-credential-manager#2415][pr-2415])
- **Support for Bitbucket Cloud's updated OAuth tokens.** Rotating
refresh tokens are now consistently saved against the resolved Bitbucket
username, avoiding repeated sign-ins caused by reusing an old refresh
token. Large access and refresh tokens are split across credential
entries when needed, so Windows users can keep the default `wincredman`
store without switching to another credential store.
([git-ecosystem/git-credential-manager#2433][pr-2433],
[git-ecosystem/git-credential-manager#2440][pr-2440])
- **Generic OAuth beyond HTTP(S).** Generic OAuth configuration now
works for non-HTTP credential requests, such as SMTP authentication for
`git send-email`. Windows Integrated Authentication remains
HTTP(S)-only. ([git-ecosystem/git-credential-manager#2445][pr-2445])
- **Refreshed terminal prompts and diagnostics.** Interactive prompts
use Spectre.Console, and Ctrl+C during a prompt restores the terminal
and exits cleanly with status 130. `git-credential-manager diagnose`
distinguishes passed, warning, failed, and skipped checks, reports the
actual credential store, and summarizes generated logs. Add `--strict`
to return a non-zero exit code for warnings as well as errors; without
it, only errors fail.
([git-ecosystem/git-credential-manager#2377][pr-2377],
[git-ecosystem/git-credential-manager#2423][pr-2423],
[git-ecosystem/git-credential-manager#2425][pr-2425])
- **More complete Trace2 diagnostics.** Expanded instrumentation covers
command execution, configuration, credential storage, UI startup, and
authentication. Entra tracing now records broker, cache, and
interaction-mode decisions alongside timings, using the existing Git
Trace2 settings. ([git-ecosystem/git-credential-manager#2408][pr-2408],
[git-ecosystem/git-credential-manager#2450][pr-2450])
- **Newer Git credential-protocol support.** GCM supports capability
negotiation and the `state[]` and `continue` fields introduced in Git
2.46, providing infrastructure for multi-stage authentication. Existing
authentication flows and compatibility with older Git versions are
preserved. ([git-ecosystem/git-credential-manager#2357][pr-2357])

#### Fixes

- Improve dispatcher failure and shutdown handling without starting the
UI framework for operations that do not need it.
([git-ecosystem/git-credential-manager#2451][pr-2451])
- Respect Git configuration `include` and `includeIf` files in scoped
queries, avoiding duplicate configuration entries when settings already
exist in an included file.
([git-ecosystem/git-credential-manager#2345][pr-2345])

#### Installation and contributor changes

- The install-from-source helper now supports both macOS and Linux at
`build/install-from-source.sh`. It defaults to a trimmed, self-contained
build; use `--aot` to opt into native compilation and its additional
toolchain requirements. See the [installation
instructions][install-from-source].
- Source builds now use `git-credential-manager.slnx`, with libraries
and tests directly under `src/` and packaging scripts under `build/`. A
solution build no longer runs packaging; use the per-platform
distribution projects for that. See the [development
guide][development].
([git-ecosystem/git-credential-manager#2367][pr-2367])
- Windows x64 and ARM64 packages use the 64-bit Inno Setup installer;
x86 packages retain a 32-bit installer.
([git-ecosystem/git-credential-manager#2380][pr-2380])
- Internal credential-helper actions (`get`, `store`, `erase`, and
`capability`) are hidden from `--help`, but remain available for Git to
invoke. ([git-ecosystem/git-credential-manager#2357][pr-2357])

**Changelog:** [v2.9.1...v3.0.0][full-changelog]

[point1-changelog]:
https://redirect.github.com/git-ecosystem/git-credential-manager/compare/v3.0.0...v3.0.1

[azrepos-tokens]:
https://redirect.github.com/git-ecosystem/git-credential-manager/blob/v3.0.1/docs/azrepos-users-and-tokens.md

[broker]:
https://redirect.github.com/git-ecosystem/git-credential-manager/blob/v3.0.1/docs/msauth-broker.md

[development]:
https://redirect.github.com/git-ecosystem/git-credential-manager/blob/v3.0.1/docs/development.md

[dotnet-support]:
https://redirect.github.com/dotnet/core/blob/main/release-notes/10.0/supported-os.md

[full-changelog]:
https://redirect.github.com/git-ecosystem/git-credential-manager/compare/v2.9.1...v3.0.0

[install-from-source]:
https://redirect.github.com/git-ecosystem/git-credential-manager/blob/v3.0.1/docs/install.md#install-from-source-helper-script

[legacy-client]:
https://redirect.github.com/git-ecosystem/git-credential-manager/blob/v3.0.1/docs/configuration.md#credentialazreposuselegacyclientid

[supported-environments]:
https://redirect.github.com/git-ecosystem/git-credential-manager/blob/v3.0.1/README.md#supported-environments

[pr-2345]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2345

[pr-2357]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2357

[pr-2365]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2365

[pr-2366]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2366

[pr-2367]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2367

[pr-2377]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2377

[pr-2379]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2379

[pr-2380]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2380

[pr-2408]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2408

[pr-2415]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2415

[pr-2416]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2416

[pr-2423]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2423

[pr-2425]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2425

[pr-2433]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2433

[pr-2440]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2440

[pr-2445]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2445

[pr-2449]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2449

[pr-2450]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2450

[pr-2451]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2451

###
[`v3.0.0`](https://redirect.github.com/git-ecosystem/git-credential-manager/releases/tag/v3.0.0):
GCM 3.0.0

[Compare
Source](https://redirect.github.com/git-ecosystem/git-credential-manager/compare/v2.9.1...v3.0.0)

Git Credential Manager 3.0 brings native ahead-of-time compilation,
Microsoft authentication broker support across Windows, macOS, and
Linux, and a refreshed terminal experience.

These notes cover changes since **GCM 2.9.1**.

> \[!IMPORTANT]
> This release changes supported operating systems and the default Azure
Repos authentication experience. Review the breaking changes before
upgrading.

#### Breaking changes and upgrade notes

##### Updated platform and .NET requirements

GCM now targets **.NET 10 on all platforms**. Windows builds no longer
use .NET Framework.

| Platform or installation method | Requirement |
| ------------------------------- |
--------------------------------------------------------- |
| Windows | Windows 10 or later; Windows Server 2016 or later |
| macOS | macOS 14 or later |
| Linux | A distribution supported by .NET 10 |
| .NET tool | Install the .NET 10 SDK before installing or updating GCM
|

See the [supported environments][supported-environments] and [.NET 10
support matrix][dotnet-support] for details. Standalone platform
packages do **not** require a separate .NET installation.

**Windows 7 and Windows 8.x are no longer supported by GCM 3.x.** GCM
2.9.x will receive minimal, security-only maintenance for those systems,
but no new features. Upgrading Windows is recommended.
([git-ecosystem/git-credential-manager#2365][pr-2365],
[git-ecosystem/git-credential-manager#2367][pr-2367])

##### Azure Repos uses OAuth tokens by default

GCM now returns Microsoft identity **OAuth tokens**, rather than
creating personal access tokens (PATs), by default for Azure Repos.
OAuth tokens are automatically refreshed as needed.

Explicit credential-type settings are still respected. If you need the
previous PAT behavior, set:

```shell
git config --global credential.azreposCredentialType pat
```

The equivalent environment variable is `GCM_AZREPOS_CREDENTIALTYPE=pat`.
See [Azure Repos users and tokens][azrepos-tokens].
([git-ecosystem/git-credential-manager#2449][pr-2449])

##### Microsoft authentication uses the OS broker by default

Broker integration is now enabled by default wherever supported, rather
than requiring an opt-in. This applies to Microsoft authentication, such
as Azure Repos; it does not change authentication for GitHub, Bitbucket,
or GitLab.

On macOS, broker authentication requires Company Portal and device
enrollment. On Linux, it requires the supported Intune setup, a GNOME
desktop, and Microsoft Edge; headless and WSL environments do not
support the Linux broker.

> \[!WARNING]
> Depending on your organization's policies, broker sign-in can prompt
you to join or enroll your device. On Windows, signing in with a
personal Microsoft account can also affect the account linked to your
local Windows user. Review the [broker documentation][broker] before
proceeding, especially on personal devices.

To opt out:

```shell
git config --global credential.msauthUseBroker false
```

The equivalent environment variable is `GCM_MSAUTH_USEBROKER=false`.
When the broker is in use, it takes precedence over
`credential.msauthFlow`.
([git-ecosystem/git-credential-manager#2449][pr-2449])

##### Azure Repos uses a dedicated GCM Entra application

GCM now signs in using its own first-party Microsoft Entra application
instead of the Visual Studio application. This enables broker support on
macOS and Linux, in addition to Windows.

If you encounter a client-application configuration error, GCM provides
guidance for retrying with the legacy application; it does **not**
silently switch back. For a one-command compatibility retry:

```shell
git -c credential.azreposUseLegacyClientId=true fetch
```

Please report the original failure if this workaround succeeds. The
legacy application does not support broker authentication on macOS or
Linux. Managed identity, service-principal, and workload-identity
federation flows are unaffected by the application change.

The undocumented developer overrides `credential.azreposDevClientId` and
`credential.azreposDevAuthorityBaseUri`, and their environment-variable
equivalents `GCM_DEV_AZREPOS_CLIENTID` and
`GCM_DEV_AZREPOS_AUTHORITYBASEURI`, have been removed. The
[legacy-client setting][legacy-client] is a focused compatibility
option, not an arbitrary client-ID or authority override.
([git-ecosystem/git-credential-manager#2416][pr-2416])

##### The embedded Microsoft sign-in web view has been removed

The Windows-only embedded web view depended on .NET Framework and is no
longer available. Use the broker, system browser, or device-code flow
instead. If you previously forced `credential.msauthFlow=embedded` or
`GCM_MSAUTH_FLOW=embedded`, change it to `auto`, `system`, or
`devicecode`. Disable broker integration as described above if you
specifically need to force a non-broker flow.
([git-ecosystem/git-credential-manager#2365][pr-2365])

##### Terminal and diagnostic output has changed

Terminal selection prompts now use arrow-key navigation instead of
numbered input, and `diagnose` has a new output format. Automation that
drives interactive menus or parses diagnostic text may need updating.
Git's credential-protocol input and output remain separate from
interactive prompts.
([git-ecosystem/git-credential-manager#2377][pr-2377],
[git-ecosystem/git-credential-manager#2425][pr-2425])

#### Features and improvements

- **Native ahead-of-time builds.** Published platform packages compile
GCM to native code to reduce startup overhead. The .NET tool remains a
framework-dependent distribution.
([git-ecosystem/git-credential-manager#2366][pr-2366],
[git-ecosystem/git-credential-manager#2367][pr-2367])
- **Cross-platform Microsoft single sign-on.** The authentication broker
can reuse OS accounts on supported Windows, macOS, and Linux
installations. When a default OS account can be used, GCM asks for
confirmation unless automatic use is explicitly enabled, or enabled by
default in environments such as Microsoft Dev Box. Set
`credential.msauthUseDefaultAccount=false` to skip the default-account
attempt. See the [broker documentation][broker].
([git-ecosystem/git-credential-manager#2379][pr-2379],
[git-ecosystem/git-credential-manager#2416][pr-2416])
- **Optional isolated Azure Repos token cache.** Set
`credential.azreposUseMicrosoftSharedCache=false`, or
`GCM_AZREPOS_USE_MSFT_CACHE=false`, to use a GCM-specific cache. Sharing
with other Microsoft developer tools remains the default.
([git-ecosystem/git-credential-manager#2415][pr-2415])
- **Support for Bitbucket Cloud's updated OAuth tokens.** Rotating
refresh tokens are now consistently saved against the resolved Bitbucket
username, avoiding repeated sign-ins caused by reusing an old refresh
token. Large access and refresh tokens are split across credential
entries when needed, so Windows users can keep the default `wincredman`
store without switching to another credential store.
([git-ecosystem/git-credential-manager#2433][pr-2433],
[git-ecosystem/git-credential-manager#2440][pr-2440])
- **Generic OAuth beyond HTTP(S).** Generic OAuth configuration now
works for non-HTTP credential requests, such as SMTP authentication for
`git send-email`. Windows Integrated Authentication remains
HTTP(S)-only. ([git-ecosystem/git-credential-manager#2445][pr-2445])
- **Refreshed terminal prompts and diagnostics.** Interactive prompts
use Spectre.Console, and Ctrl+C during a prompt restores the terminal
and exits cleanly with status 130. `git-credential-manager diagnose`
distinguishes passed, warning, failed, and skipped checks, reports the
actual credential store, and summarizes generated logs. Add `--strict`
to return a non-zero exit code for warnings as well as errors; without
it, only errors fail.
([git-ecosystem/git-credential-manager#2377][pr-2377],
[git-ecosystem/git-credential-manager#2423][pr-2423],
[git-ecosystem/git-credential-manager#2425][pr-2425])
- **More complete Trace2 diagnostics.** Expanded instrumentation covers
command execution, configuration, credential storage, UI startup, and
authentication. Entra tracing now records broker, cache, and
interaction-mode decisions alongside timings, using the existing Git
Trace2 settings. ([git-ecosystem/git-credential-manager#2408][pr-2408],
[git-ecosystem/git-credential-manager#2450][pr-2450])
- **Newer Git credential-protocol support.** GCM supports capability
negotiation and the `state[]` and `continue` fields introduced in Git
2.46, providing infrastructure for multi-stage authentication. Existing
authentication flows and compatibility with older Git versions are
preserved. ([git-ecosystem/git-credential-manager#2357][pr-2357])

#### Fixes

- Improve dispatcher failure and shutdown handling without starting the
UI framework for operations that do not need it.
([git-ecosystem/git-credential-manager#2451][pr-2451])
- Respect Git configuration `include` and `includeIf` files in scoped
queries, avoiding duplicate configuration entries when settings already
exist in an included file.
([git-ecosystem/git-credential-manager#2345][pr-2345])

#### Installation and contributor changes

- The install-from-source helper now supports both macOS and Linux at
`build/install-from-source.sh`. It defaults to a trimmed, self-contained
build; use `--aot` to opt into native compilation and its additional
toolchain requirements. See the [installation
instructions][install-from-source].
- Source builds now use `git-credential-manager.slnx`, with libraries
and tests directly under `src/` and packaging scripts under `build/`. A
solution build no longer runs packaging; use the per-platform
distribution projects for that. See the [development
guide][development].
([git-ecosystem/git-credential-manager#2367][pr-2367])
- Windows x64 and ARM64 packages use the 64-bit Inno Setup installer;
x86 packages retain a 32-bit installer.
([git-ecosystem/git-credential-manager#2380][pr-2380])
- Internal credential-helper actions (`get`, `store`, `erase`, and
`capability`) are hidden from `--help`, but remain available for Git to
invoke. ([git-ecosystem/git-credential-manager#2357][pr-2357])

**Full changelog:** [v2.9.1...v3.0.0][full-changelog]

[azrepos-tokens]:
https://redirect.github.com/git-ecosystem/git-credential-manager/blob/v3.0.0/docs/azrepos-users-and-tokens.md

[broker]:
https://redirect.github.com/git-ecosystem/git-credential-manager/blob/v3.0.0/docs/msauth-broker.md

[development]:
https://redirect.github.com/git-ecosystem/git-credential-manager/blob/v3.0.0/docs/development.md

[dotnet-support]:
https://redirect.github.com/dotnet/core/blob/main/release-notes/10.0/supported-os.md

[full-changelog]:
https://redirect.github.com/git-ecosystem/git-credential-manager/compare/v2.9.1...v3.0.0

[install-from-source]:
https://redirect.github.com/git-ecosystem/git-credential-manager/blob/v3.0.0/docs/install.md#install-from-source-helper-script

[legacy-client]:
https://redirect.github.com/git-ecosystem/git-credential-manager/blob/v3.0.0/docs/configuration.md#credentialazreposuselegacyclientid

[supported-environments]:
https://redirect.github.com/git-ecosystem/git-credential-manager/blob/v3.0.0/README.md#supported-environments

[pr-2345]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2345

[pr-2357]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2357

[pr-2365]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2365

[pr-2366]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2366

[pr-2367]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2367

[pr-2377]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2377

[pr-2379]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2379

[pr-2380]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2380

[pr-2408]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2408

[pr-2415]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2415

[pr-2416]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2416

[pr-2423]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2423

[pr-2425]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2425

[pr-2433]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2433

[pr-2440]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2440

[pr-2445]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2445

[pr-2449]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2449

[pr-2450]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2450

[pr-2451]:
https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2451

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/tak848/dotfiles).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMzQuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjEzNC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZSIsInVwZGF0ZV9tYWpvciJdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: tak-automation[bot] <221638520+tak-automation[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engineering Refactoring or build changes gcm3.0 Targets the next major release of Git Credential Manager - v3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants