# File lib/r10k/git/rugged/bare_repository.rb, line 28 def clone(remote) logger.debug1 { "Cloning '#{remote}' into #{@path}" } @_rugged_repo = ::Rugged::Repository.init_at(@path.to_s, true) with_repo do |repo| config = repo.config config['remote.origin.url'] = remote config['remote.origin.fetch'] = '+refs/*:refs/*' config['remote.origin.mirror'] = 'true' fetch end rescue Rugged::SshError, Rugged::NetworkError => e raise R10K::Git::GitError.new(e.message, :git_dir => git_dir, :backtrace => e.backtrace) end