fastlane: [Match] Manually manage the fastlane match Repo was broken

New Regression Checklist

Regression Information

Using this instruction docs.fastlane сommand GitHelper.clone not working. I’m trying to add existing certificates to the private git repository.

  • Breaking version: [e.g. 2.106.0]
  • Last working version: [e.g. 2.105.2]

Regression Description

Complete output when running fastlane, including the stack trace and command used
2.4.2 :023 > workspace = Match::GitHelper.clone(git_url, shallow_clone, manual_password: manual_password)
NameError: uninitialized constant Match::GitHelper
Did you mean?  Match::Helper
	from (irb):23
	from /Users/User1/.rvm/rubies/ruby-2.4.2/bin/irb:11:in `<main>'

Environment

Do this from an interactive Ruby console

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 3
  • Comments: 15 (7 by maintainers)

Most upvoted comments

(That link unfortunately does not work directly, you have to go to https://docs.fastlane.tools/advanced/other/#manually-manage-the-fastlane-match-repo first an un-collapse the “Instructions”)

Hey everyone 👋 Just wanted to give the official response/announcement to this…

Match::GitHelper was replaced a few fastlane ago (since 2.106.0 which happened in https://github.com/fastlane/fastlane/pull/13405). This big internal rewrite was to allow for other storage and encryption schemes to be integrated in the near future - so that’s its not only git storage and not only AES ecryption using OpenSSL.

Match::GitHelper was removed in this PR but we could add something similar back in to help make this easier to do manually.

The docs have been updated accordingly here - https://docs.fastlane.tools/advanced/other/#decryption-instructions

@lparenteau Thanks for this workaround. Note that in my case, I also had to add the following config value to get it working properly: config[:git_branch] = 'master'

Seems like that should’ve been the default, but I was getting an exception when calling the storage.download method without that included.

Agreed, this was something we used often to incorporate existing certificates and provisioning profiles into Match. Would love to have this working again or another way to achieve the same end result.

I think so, thanks everyone for posting solutions and for updating the official docs.

We frequently use this as well, please fix.

can we have a official word here? This was something that was supported and documented, so I suppose this is a breaking change.

I had written about using this method to use existing certificates / profiles with fastlane: https://medium.com/me/stats/post/a325be69dac6

@vitaminBW the Match::GitHelper.clone method is not available since this commit cc282f264f8cefbd8561cd9b1388c75d073307a1

Here is a workaround I am using in my custom actions:

config = FastlaneCore::Configuration.create(Match::Options.available_options, {}).load_configuration_file('Matchfile').options

config[:clone_branch_directly] = true
config[:skip_docs] = true
config[:shallow_clone] = true

# clone repo to get path
storage = Match::Storage.for_mode('git', config)
storage.download

encryption = Match::Encryption.for_storage_mode('git', {
  git_url: config[:git_url],
  working_directory: storage.working_directory
})
encryption.decrypt_files

#use path to the directory to manipulate files: 
storage.working_directory

Hope it helps.

In my opinion this is not very handy. It was cleaner to call a wrapper that took care of both cloning and decrypting.