ODBC Driver for GitHub

Build 26.0.9770

DownloadRepositoryArchive

Downloads a complete repository archive at a branch, tag, or commit.

Sample

Download the default branch as a tarball.

EXECUTE [Information].[DownloadRepositoryArchive] OwnerLogin='cdata', Repository='publicRepository', Format='tarball', LocalPath='C:/Users/CData/Desktop/publicRepository.tar.gz'

Specify Ref to download a branch, tag, or commit, and set Format to zipball to download a ZIP archive.

EXECUTE [Information].[DownloadRepositoryArchive] OwnerLogin='cdata', Repository='publicRepository', Ref='main', Format='zipball', LocalPath='C:/Users/CData/Desktop/publicRepository.zip'

When neither LocalPath nor OutputStream is supplied, FileData contains the Base64-encoded archive.

Input

Name Type Required Description
OwnerLogin String False The username or organization name that owns the repository.
Repository String True The name of the repository to download.
Ref String False The branch name, tag, or commit SHA to download. When omitted, the repository's default branch is used.
Format String False The archive format to download.

The allowed values are tarball, zipball.

The default value is tarball.

LocalPath String False The absolute file path on the local system where the downloaded archive is saved. This is optional if using OutputStream.

Result Set Columns

Name Type Description
Success Boolean Indicates whether the repository archive download completed successfully.
Details String Provides additional information about the operation, including error messages if the operation failed.
FileData String Outputs the archive content as a BASE64-encoded string if both LocalPath and OutputStream are not specified.

Copyright (c) 2026 CData Software, Inc. - All rights reserved.
Build 26.0.9770