Allow anonymous access in private registries
This commit is contained in:
parent
b8954030e3
commit
cc12738f8e
@ -566,8 +566,8 @@ class CurlGitHubPackagesDownloadStrategy < CurlDownloadStrategy
|
||||
def initialize(url, name, version, **meta)
|
||||
meta ||= {}
|
||||
meta[:headers] ||= []
|
||||
token = ENV.fetch("HOMEBREW_REGISTRY_ACCESS_TOKEN", "QQ==")
|
||||
meta[:headers] << ["Authorization: Bearer #{token}"]
|
||||
token = Homebrew::EnvConfig.artifact_domain ? ENV.fetch("HOMEBREW_REGISTRY_ACCESS_TOKEN", "") : "QQ=="
|
||||
meta[:headers] << ["Authorization: Bearer #{token}"] unless token.empty?
|
||||
super(url, name, version, meta)
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user