ajayspot commited on
Commit
d0a369d
·
verified ·
1 Parent(s): 310bb10

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. evaluate_atomic_matching.py +8 -6
evaluate_atomic_matching.py CHANGED
@@ -104,14 +104,16 @@ def process_questions(llm_model: str, openai_api_Key: str, deploy_key: str, metr
104
  # Save the key file and get its path
105
  key_path = setup_ssh_key(deploy_key)
106
 
107
- # Explicitly set the SSH command with the deploy key file path
108
- ssh_command = f'ssh -i {key_path} -o StrictHostKeyChecking=no'
109
  os.environ['GIT_SSH_COMMAND'] = ssh_command
110
 
111
- # Test SSH connection
112
- result = subprocess.run(['ssh', '-T', '-i', key_path, 'git@github.com'],
113
- capture_output=True,
114
- text=True)
 
 
115
  if result.returncode != 1: # GitHub's SSH test always returns 1 when successful
116
  raise Exception(f"SSH test failed with return code {result.returncode}\nOutput: {result.stderr}")
117
  except Exception as e:
 
104
  # Save the key file and get its path
105
  key_path = setup_ssh_key(deploy_key)
106
 
107
+ # Explicitly set the SSH command with the deploy key file path and strict host key checking disabled
108
+ ssh_command = f'ssh -i {key_path} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
109
  os.environ['GIT_SSH_COMMAND'] = ssh_command
110
 
111
+ # Test SSH connection with strict host key checking disabled
112
+ result = subprocess.run(
113
+ ['ssh', '-T', '-i', key_path, '-o', 'StrictHostKeyChecking=no', '-o', 'UserKnownHostsFile=/dev/null', 'git@github.com'],
114
+ capture_output=True,
115
+ text=True
116
+ )
117
  if result.returncode != 1: # GitHub's SSH test always returns 1 when successful
118
  raise Exception(f"SSH test failed with return code {result.returncode}\nOutput: {result.stderr}")
119
  except Exception as e: