GitHub Launches Public Beta for SHA-256 Repositories as Git 3.0 Plans Default Algorithm Shift
AI coding · Cybersecurity and privacy
GitHub has initiated a public beta supporting SHA-256 repositories, allowing developers to choose SHA-1 or SHA-256 when creating repositories. The beta applies to GitHub.com and GitHub Enterprise Cloud with data residency. Concurrently, the Git team plans to make SHA-256 the default algorithm in Git 3.0, though Git 3.0 has no release date yet and there is no plan to drop SHA-1 support.
GitHub has announced a public beta for SHA-256 repository support. Developers can now select SHA-256 or SHA-1 via the web UI or API upon repository creation, covering both GitHub.com and GitHub Enterprise Cloud with data residency support. Concurrently, the Git development team plans to transition new repositories to SHA-256 by default in the upcoming Git 3.0 release. Git currently defaults to SHA-1 to generate hash IDs identifying commits, files, and tree structures. While mitigations were introduced after collision risks were demonstrated in 2017, SHA-256 support has been developed since 2020 for long-term security. The Git team noted that transitioning the default requires broad support across Git libraries, applications, and hosting platforms. Git 3.0 currently lacks a release date, and there are no plans to discontinue SHA-1 support. Key constraints include GitHub's continued default of SHA-1 for new repositories and an inability to switch hash algorithms once a repository is created. Repositories with different hash algorithms cannot push or fetch data directly between each other. SHA-256 hashes use 64 hex characters compared to 40 characters in SHA-1, necessitating updates to scripts and tooling. Git 2.30 or newer is required to operate SHA-256 repositories, Git 2.41 or newer is needed to clone empty repositories, and GitHub CLI and GitHub Desktop do not yet support creating them.
Key takeaways
- GitHub launched a public beta for creating SHA-256 repositories across GitHub.com and GitHub Enterprise Cloud with data residency.
- Git 3.0 plans to default to SHA-256 for new repositories, but has no release date yet and no plan to drop SHA-1 support.
- Repository hash algorithms cannot be changed post-creation, and repositories using different hashes cannot directly push or fetch data.
- SHA-256 identifiers use 64 characters, require Git 2.30 or newer, and are not yet creatable via GitHub CLI or Desktop.
Source:iThome Read the original ↗
Prepared, checked and automatically published by AI; not individually reviewed by a human. Translation checked by AI.