Sha256: 5b9d8e483760e972962e1fa2ff00de85ef8fad40be412bdf43736b9b965c2e6f
Contents?: true
Size: 1.04 KB
Versions: 25
Compression:
Stored size: 1.04 KB
Contents
# frozen_string_literal: true # tau info status ssh module InfoStatusSSH # Backend method for info status ssh. # @return [Boolean] is ssh available? # rubocop:disable Metrics/MethodLength def info_status_ssh log.debug 'Check ssh status' ssh_auth_sock = ENV['SSH_AUTH_SOCK'] gpg_ssh_socket = _info_status_ssh_socket_path.chomp unless ssh_auth_sock == gpg_ssh_socket log.error 'ssh does not use gpg ssh socket' return false end unless _info_status_ssh_keys log.error 'ssh keys are not available' return false end unless _file_exists? gpg_ssh_socket log.error 'gpg ssh socket is not available' return false end log.debug 'ssh is available' true end # rubocop:enable Metrics/MethodLength private # Get ssh socket path def _info_status_ssh_socket_path run config.active['cmd_info_status_ssh_socket'] end # Check ssh keys def _info_status_ssh_keys status_keys = try config.active['cmd_info_status_ssh_keys'] status_keys.exitstatus.zero? end end
Version data entries
25 entries across 25 versions & 1 rubygems