match/lib/match/storage/git_storage.rb in fastlane-2.140.0 vs match/lib/match/storage/git_storage.rb in fastlane-2.141.0

- old
+ new

@@ -71,11 +71,14 @@ # No existing working directory, creating a new one now self.working_directory = Dir.mktmpdir command = "git clone #{self.git_url.shellescape} #{self.working_directory.shellescape}" - command << " -c http.extraheader='AUTHORIZATION: basic #{self.git_basic_authorization}'" unless self.git_basic_authorization.nil? - command << " -c http.extraheader='AUTHORIZATION: bearer #{self.git_bearer_authorization}'" unless self.git_bearer_authorization.nil? + # HTTP headers are supposed to be be case insensitive but + # Bitbucket requires `Authorization: Basic` and `Authorization Bearer` to work + # https://github.com/fastlane/fastlane/pull/15928 + command << " -c http.extraheader='Authorization: Basic #{self.git_basic_authorization}'" unless self.git_basic_authorization.nil? + command << " -c http.extraheader='Authorization: Bearer #{self.git_bearer_authorization}'" unless self.git_bearer_authorization.nil? if self.shallow_clone command << " --depth 1 --no-single-branch" elsif self.clone_branch_directly command += " -b #{self.branch.shellescape} --single-branch"