mirror of
https://github.com/xcat2/confluent.git
synced 2025-02-14 17:48:26 +00:00
Have askpass delete itself
This causes ssh-add to give up, instead of endlessly rerunning the askpass script.
This commit is contained in:
parent
99a5c454ba
commit
ed91e0f2f3
@ -125,7 +125,7 @@ def prep_ssh_key(keyname):
|
||||
try:
|
||||
askpass = os.path.join(tmpdir, 'askpass.sh')
|
||||
with open(askpass, 'w') as ap:
|
||||
ap.write('#!/bin/sh\necho $CONFLUENT_SSH_PASSPHRASE\n')
|
||||
ap.write('#!/bin/sh\necho $CONFLUENT_SSH_PASSPHRASE\n;rm {0}\n'.format(askpass))
|
||||
os.chmod(askpass, 0o700)
|
||||
os.environ['CONFLUENT_SSH_PASSPHRASE'] = get_passphrase()
|
||||
os.environ['DISPLAY'] = 'NONE'
|
||||
|
Loading…
x
Reference in New Issue
Block a user