lib/match/git_helper.rb in match-0.8.1 vs lib/match/git_helper.rb in match-0.9.0
- old
+ new
@@ -3,18 +3,25 @@
def self.clone(git_url, shallow_clone, manual_password: nil, skip_docs: false, branch: "master")
return @dir if @dir
@dir = Dir.mktmpdir
- # GIT_TERMINAL_PROMPT will fail the `git clone` command if user credentials are missing
- command = "GIT_TERMINAL_PROMPT=0 git clone '#{git_url}' '#{@dir}'"
+ command = "git clone '#{git_url}' '#{@dir}'"
command << " --depth 1" if shallow_clone
UI.message "Cloning remote git repo..."
- FastlaneCore::CommandExecutor.execute(command: command,
- print_all: $verbose,
- print_command: $verbose)
+ begin
+ # GIT_TERMINAL_PROMPT will fail the `git clone` command if user credentials are missing
+ FastlaneCore::CommandExecutor.execute(command: "GIT_TERMINAL_PROMPT=0 #{command}",
+ print_all: $verbose,
+ print_command: $verbose)
+ rescue
+ UI.error("Error cloning certificates repo, please make sure you have read access to the repository you want to use")
+ UI.error("Run the following command manually to make sure you're properly authenticated:")
+ UI.command(command)
+ UI.user_error!("Error cloning certificates git repo, please make sure you have access to the repository - see instructions above")
+ end
UI.user_error!("Error cloning repo, make sure you have access to it '#{git_url}'") unless File.directory?(@dir)
checkout_branch(branch) unless branch == "master"
@@ -37,11 +44,9 @@
def self.generate_commit_message(params)
# 'Automatic commit via fastlane'
[
"[fastlane]",
"Updated",
- params[:app_identifier],
- "for",
params[:type].to_s
].join(" ")
end
def self.match_version(workspace)