diff --git a/vcpkg/maintainers/functions/vcpkg_from_github.md b/vcpkg/maintainers/functions/vcpkg_from_github.md index dd3c6ad5..3ee36987 100644 --- a/vcpkg/maintainers/functions/vcpkg_from_github.md +++ b/vcpkg/maintainers/functions/vcpkg_from_github.md @@ -1,7 +1,7 @@ --- title: vcpkg_from_github description: Learn how to use vcpkg_from_github. -ms.date: 01/10/2024 +ms.date: 04/24/2025 --- # vcpkg_from_github @@ -22,6 +22,7 @@ vcpkg_from_github( [GITHUB_HOST ] [AUTHORIZATION_TOKEN <${SECRET_FROM_FILE}>] [FILE_DISAMBIGUATOR ] + [USE_TARBALL_API] ) ``` @@ -71,12 +72,18 @@ This field should contain the scheme, host, and port of the desired URL without ### AUTHORIZATION_TOKEN -A token to be passed via the Authorization HTTP header as "token ${AUTHORIZATION_TOKEN}". +A token to be passed via the Authorization HTTP header as "token ${AUTHORIZATION_TOKEN}". If `AUTHORIZATION_TOKEN` is a [fine-grained access token](https://docs.github.com/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#fine-grained-personal-access-tokens), you must also use [`USE_TARBALL_API`](#use_tarball_api). ### FILE_DISAMBIGUATOR A token to uniquely identify the resulting filename if the SHA512 changes even though a git ref does not, to avoid stepping on the same file name. +### USE_TARBALL_API + +When specified, vcpkg will use the tarball API documented at [GitHub REST API](https://docs.github.com/rest/repos/contents?#download-a-repository-archive-tar) rather than the archive API to download sources. + +This option exists rather than being a globally controlled setting because the SHA512 of sources returned by the tarball API differs from the regular archives API. + ## Notes At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present.