Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
handle keygen errors
  • Loading branch information
guykisel committed Jul 21, 2017
commit 6adafa4669b5693632b76be3a046edc439aa2ad4
9 changes: 6 additions & 3 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,12 @@ def clone_dotfiles(url, org, tempdir, token):

def ssh_keygen(url):
with SSH_LOCK:
output = subprocess.check_output(['ssh-keygen', '-F', url])
if output.strip():
return
try:
output = subprocess.check_output(['ssh-keygen', '-F', url], stderr=subprocess.STDOUT)
if output.strip():
return
except subprocess.CalledProcessError:
pass
subprocess.check_call(['ssh-keyscan', '-t', 'rsa', url, '>>', '~/.ssh/known_hosts'])


Expand Down