parameters: (self)
docstring: When WAF_SSH_KEY points to a private key, a .ssh directory will be created in the build directory
  		Make sure that the ssh key does not prompt for a password
docstring_summary: When WAF_SSH_KEY points to a private key, a .ssh directory will be created in the build directory
  		Make sure that the ssh key does not prompt for a password
docstring_tokens: When WAF_SSH_KEY points to a private key a . ssh directory will be created in the build directory Make sure that the ssh key does not prompt for a password
function: def setup_private_ssh_key(self):
  		"""
  		When WAF_SSH_KEY points to a private key, a .ssh directory will be created in the build directory
  		Make sure that the ssh key does not prompt for a password
  		"""
  		key = os.environ.get('WAF_SSH_KEY', '')
  		if not key:
  			return
  		if not os.path.isfile(key):
  			self.fatal('Key in WAF_SSH_KEY must point to a valid file')
  		self.ssh_dir = os.path.join(self.path.abspath(), 'build', '.ssh')
  		self.ssh_hosts = os.path.join(self.ssh_dir, 'known_hosts')
  		self.ssh_key = os.path.join(self.ssh_dir, os.path.basename(key))
  		self.ssh_config = os.path.join(self.ssh_dir, 'config')
  		for x in self.ssh_hosts, self.ssh_key, self.ssh_config:
  			if not os.path.isfile(x):
  				if not os.path.isdir(self.ssh_dir):
  					os.makedirs(self.ssh_dir)
  				Utils.writef(self.ssh_key, Utils.readf(key), 'wb')
  				os.chmod(self.ssh_key, 448)
  
  				Utils.writef(self.ssh_hosts, '\n'.join(self.get_ssh_hosts()))
  				os.chmod(self.ssh_key, 448)
  
  				Utils.writef(self.ssh_config, 'UserKnownHostsFile %s' % self.ssh_hosts, 'wb')
  				os.chmod(self.ssh_config, 448)
  		self.env.SSH_OPTS = ['-F', self.ssh_config, '-i', self.ssh_key]
  		self.env.append_value('RSYNC_SEND_OPTS', '--exclude=build/.ssh')
function_tokens: def setup_private_ssh_key ( self ) : key = os . environ . get ( 'WAF_SSH_KEY' , '' ) if not key : return if not os . path . isfile ( key ) : self . fatal ( 'Key in WAF_SSH_KEY must point to a valid file' ) self . ssh_dir = os . path . join ( self . path . abspath ( ) , 'build' , '.ssh' ) self . ssh_hosts = os . path . join ( self . ssh_dir , 'known_hosts' ) self . ssh_key = os . path . join ( self . ssh_dir , os . path . basename ( key ) ) self . ssh_config = os . path . join ( self . ssh_dir , 'config' ) for x in self . ssh_hosts , self . ssh_key , self . ssh_config : if not os . path . isfile ( x ) : if not os . path . isdir ( self . ssh_dir ) : os . makedirs ( self . ssh_dir ) Utils . writef ( self . ssh_key , Utils . readf ( key ) , 'wb' ) os . chmod ( self . ssh_key , 448 ) Utils . writef ( self . ssh_hosts , '\n' . join ( self . get_ssh_hosts ( ) ) ) os . chmod ( self . ssh_key , 448 ) Utils . writef ( self . ssh_config , 'UserKnownHostsFile %s' % self . ssh_hosts , 'wb' ) os . chmod ( self . ssh_config , 448 ) self . env . SSH_OPTS = [ '-F' , self . ssh_config , '-i' , self . ssh_key ] self . env . append_value ( 'RSYNC_SEND_OPTS' , '--exclude=build/.ssh' )