---
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; 2 could not be searched.

- **2026-05-29** `28fbf7b9a486` — 1 info
  - endpoint added

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

---

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