GitHub launches public preview of SHA-256 Git repositories, a more secure default-to-be

0xkarasy · x · 2026-12-04

GitHub has shipped public preview support for SHA-256 Git repositories on github.com and GitHub Enterprise Cloud with data residency.

Background: Git has traditionally identified objects with SHA-1, whose weaknesses were exposed by attacks like SHAttered. SHA-256 support landed in Git 2.30 (Dec 2020) and will become the default for new repositories in Git 3.0. You can now pick SHA-1 or SHA-256 when creating a repo via the web UI or API, and cloning automatically uses the remote's algorithm.

Caveats: the hash algorithm can't be changed after creation; existing repos stay on SHA-1. SHA-256 object IDs are 64 hex chars (vs 40), so tooling reading IDs from APIs or webhooks must handle both, and environments need Git 2.30+ (plus SHA-256 support in libgit2 etc.). A REST API endpoint reports a repo's algorithm.

Related event: GitHub Rolls Out Public Preview of SHA-256 Repositories(3 posts)→

Original post →

More from coding & agent

coding & agent channel →