Merge pull request #19885 from fidelity-contributions/github-16669
Anonymous OCI registry mirror support
This commit is contained in:
commit
713289e2eb
@ -703,7 +703,12 @@ class CurlGitHubPackagesDownloadStrategy < CurlDownloadStrategy
|
||||
meta[:headers] ||= []
|
||||
# GitHub Packages authorization header.
|
||||
# HOMEBREW_GITHUB_PACKAGES_AUTH set in brew.sh
|
||||
meta[:headers] << "Authorization: #{HOMEBREW_GITHUB_PACKAGES_AUTH}"
|
||||
# If using a private GHCR mirror with no Authentication set then do not add the header. In all other cases add it.
|
||||
if !Homebrew::EnvConfig.artifact_domain.presence ||
|
||||
Homebrew::EnvConfig.docker_registry_basic_auth_token.presence ||
|
||||
Homebrew::EnvConfig.docker_registry_token.presence
|
||||
meta[:headers] << "Authorization: #{HOMEBREW_GITHUB_PACKAGES_AUTH}"
|
||||
end
|
||||
super
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user