mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-25 22:36:13 +01:00
Always expand '~' in sshkey path
This commit is contained in:
parent
f908092f3d
commit
7fb62349fd
@ -668,6 +668,9 @@ class SignatureAuthHandler(AuthHandlerBase):
|
||||
def ssh_sign(self, data, namespace, keyfile=None):
|
||||
if not keyfile:
|
||||
keyfile = self.guess_keyfile()
|
||||
if not keyfile:
|
||||
raise oscerr.OscIOError(None, "No SSH key configured or auto-detected")
|
||||
keyfile = os.path.expanduser(keyfile)
|
||||
cmd = [self.ssh_keygen_path, '-Y', 'sign', '-f', keyfile, '-n', namespace, '-q']
|
||||
proc = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, encoding="utf-8")
|
||||
signature, _ = proc.communicate(data)
|
||||
|
Loading…
Reference in New Issue
Block a user