mirror of
https://github.com/openSUSE/osc.git
synced 2025-08-08 16:24:03 +02:00
Merge pull request #1553 from dmach/fix-sshkey-expanduser
Always expand '~' in sshkey path
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user