---
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

---

[API](https://skmtc.net/github/apis/github-v3-rest-api.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api/versions/a367f7028301/schema)
