context: Add SSH_AGENT_PID and SSH_AUTH_SOCK to initial environment

This allow to use the host-side SSH agent when cloning protected
repositories via kas. We already do this for the build environment.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
This commit is contained in:
Jan Kiszka 2018-09-11 16:15:20 +02:00 committed by Daniel Wagner
parent e1ac18d1ba
commit 82b0034bac

View File

@ -102,7 +102,8 @@ class Context:
logging.warning('kas: No supported distros found in %s. '
'No default locales set.', distro_bases)
for key in ['http_proxy', 'https_proxy', 'ftp_proxy', 'no_proxy']:
for key in ['http_proxy', 'https_proxy', 'ftp_proxy', 'no_proxy',
'SSH_AGENT_PID', 'SSH_AUTH_SOCK']:
val = os.environ.get(key, None)
if val:
self.environ[key] = val