Allow anonymous access in private registries
This commit is contained in:
		
							parent
							
								
									0fc7762e99
								
							
						
					
					
						commit
						285513fd65
					
				@ -568,8 +568,7 @@ class CurlGitHubPackagesDownloadStrategy < CurlDownloadStrategy
 | 
			
		||||
  def initialize(url, name, version, **meta)
 | 
			
		||||
    meta ||= {}
 | 
			
		||||
    meta[:headers] ||= []
 | 
			
		||||
    token = Homebrew::EnvConfig.docker_registry_token
 | 
			
		||||
    token ||= "QQ=="
 | 
			
		||||
    token = Homebrew::EnvConfig.artifact_domain ? Homebrew::EnvConfig.docker_registry_token : "QQ=="
 | 
			
		||||
    meta[:headers] << ["Authorization: Bearer #{token}"] if token.present?
 | 
			
		||||
    super(url, name, version, meta)
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user