---
title: "Get the hash algorithm for a repository"
method: GET
path: "/repos/{owner}/{repo}/hash-algorithm"
tags: ["repos"]
---

# Get the hash algorithm for a repository

`GET /repos/{owner}/{repo}/hash-algorithm`

Returns the hash algorithm used to store repository objects.

## Path parameters

- `owner` string, required
- `repo` string, required

## Response `200`

Response

- RepositoryHashAlgorithm — Repository hash algorithm
  - `hash_algorithm` 'sha1' | 'sha256', required — The Git hash algorithm used by this repository.

## Other responses

- `403` — Forbidden
- `404` — Resource not found

## Changes

> 62 revisions in range; 1 not diffed, 2 could not be searched.

- **2026-05-29** (2022-11-28) `38dab91d2754` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/github/apis/rest/changes/repos/:owner/:repo/hash-algorithm/get.md)

---

[API](https://skmtc.dev/github/apis/rest.md) · [All operations](https://skmtc.dev/github/apis/rest/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/github/rest/revisions/5bded2c77b93/schema)
