GitHub opens SHA-256 Git repositories in public preview as an opt-in choice; SHA-1 stays the default
GitHub announced that SHA-256 repositories are in public preview. Users can pick SHA-1 or SHA-256 when they create a repository in the web interface or through the API. GitHub's changelog dated 2026-12-03 confirms this and says the preview also covers GitHub Enterprise Cloud with data residency (blog.github.com). This is product news, not a vulnerability or an incident. It responds to known SHA-1 collision weaknesses. The choice is permanent, and existing SHA-1 repositories cannot be converted in place.
Detalhes técnicos
- SHA-256 repositories need Git 2.30 or newer. Cloning an empty SHA-256 repository needs Git 2.41 or newer (securityonline.info).
- Git cannot push or pull directly between repositories that use different hash algorithms (securityonline.info).
- SHA-256 object IDs are 64 hex characters, against 40 for SHA-1. Scripts, APIs and webhook handlers must handle both lengths (securityonline.info, blog.github.com).
- Clones and forks keep the parent repository's algorithm.
- GitHub CLI and GitHub Desktop cannot yet create SHA-256 repositories (securityonline.info).
- New repositories on GitHub still default to SHA-1. Git 3.0 plans to make SHA-256 the default.
Remediação
No action is required. Teams that want SHA-256 must create a new repository and migrate their code to it. Before they do, they should check their tooling and any integrations that parse object IDs.
Linha do tempo
-
GitHub opens SHA-256 Git repositories in public preview as an opt-in choice; SHA-1 stays the default
ler a análise desta fonte ocultar
GitHub announced that SHA-256 repositories are in public preview. Users can pick SHA-1 or SHA-256 when they create a repository in the web interface or through the API. GitHub's changelog dated 2026-12-03 confirms this and says the preview also covers GitHub Enterprise Cloud with data residency (blog.github.com). This is product news, not a vulnerability or an incident. It responds to known SHA-1 collision weaknesses. The choice is permanent, and existing SHA-1 repositories cannot be converted in place.
Technical Details
- SHA-256 repositories need Git 2.30 or newer. Cloning an empty SHA-256 repository needs Git 2.41 or newer (securityonline.info).
- Git cannot push or pull directly between repositories that use different hash algorithms (securityonline.info).
- SHA-256 object IDs are 64 hex characters, against 40 for SHA-1. Scripts, APIs and webhook handlers must handle both lengths (securityonline.info, blog.github.com).
- Clones and forks keep the parent repository's algorithm.
- GitHub CLI and GitHub Desktop cannot yet create SHA-256 repositories (securityonline.info).
- New repositories on GitHub still default to SHA-1. Git 3.0 plans to make SHA-256 the default.
Remediation
No action is required. Teams that want SHA-256 must create a new repository and migrate their code to it. Before they do, they should check their tooling and any integrations that parse object IDs.