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)
|
def initialize(url, name, version, **meta)
|
||||||
meta ||= {}
|
meta ||= {}
|
||||||
meta[:headers] ||= []
|
meta[:headers] ||= []
|
||||||
token = ENV.fetch("HOMEBREW_REGISTRY_ACCESS_TOKEN", "QQ==")
|
token = Homebrew::EnvConfig.artifact_domain ? ENV.fetch("HOMEBREW_REGISTRY_ACCESS_TOKEN", "") : "QQ=="
|
||||||
meta[:headers] << ["Authorization: Bearer #{token}"]
|
meta[:headers] << ["Authorization: Bearer #{token}"] unless token.empty?
|
||||||
super(url, name, version, meta)
|
super(url, name, version, meta)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user