GET/repos/{owner}/{repo}/tarball/{ref}

Download a repository tar archive

Returns a redirect to a tar archive for a repository. Use ref to select a branch, tag, or commit; if you omit it, the repository's default branch is used. Follow the redirect or use its Location header to make a second GET request; download links for private repositories expire after five minutes.

3 parameters
ownerstringrequired
The account owner of the repository; the name is not case-sensitive.
repostringrequired
The repository name without the `.git` extension; the name is not case-sensitive.
refstringrequired
The branch, tag, or commit to use for the archive. Defaults to the repository's default branch when omitted.

1 status code
302Returns a redirect to the repository's tar archive; use the `Location` header to retrieve it if your HTTP framework does not follow redirects.

Error handling

The owner and repo path parameters must identify the repository. Use ref to specify the branch, tag, or commit to archive; omitting it selects the repository's default branch.