bluenevus commited on
Commit
4a705c3
·
verified ·
1 Parent(s): 8007976

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -16,8 +16,8 @@ def fetch_github_file(github_url, ssh_private_key):
16
  ssh = paramiko.SSHClient()
17
  ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
18
 
19
- # Ensure the SSH key is properly stripped of any leading/trailing whitespace
20
- ssh_private_key = ssh_private_key.strip()
21
 
22
  # Load the private key
23
  private_key = paramiko.RSAKey.from_private_key(io.StringIO(ssh_private_key))
 
16
  ssh = paramiko.SSHClient()
17
  ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
18
 
19
+ # Clean up the SSH key
20
+ ssh_private_key = '\n'.join(line.strip() for line in ssh_private_key.splitlines() if line.strip())
21
 
22
  # Load the private key
23
  private_key = paramiko.RSAKey.from_private_key(io.StringIO(ssh_private_key))