diff --git a/Library/Homebrew/utils/github.rb b/Library/Homebrew/utils/github.rb index c934012d28..903116d46d 100644 --- a/Library/Homebrew/utils/github.rb +++ b/Library/Homebrew/utils/github.rb @@ -680,7 +680,7 @@ module GitHub private_class_method def self.add_auth_token_to_url!(url) if API.credentials_type == :env_token - url.sub!(%r{^https://github\.com/}, "https://#{API.credentials}@github.com/") + url.sub!(%r{^https://github\.com/}, "https://x-access-token:#{API.credentials}@github.com/") end url end