From 67937907ca7e90bc8fe3019d3c4d6436a8eba7ed Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 25 Jul 2014 18:02:48 +0200 Subject: nix-daemon: Pass on the user's $SSH_AUTH_SOCK to the SSH substituter --- src/download-via-ssh/download-via-ssh.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/download-via-ssh') diff --git a/src/download-via-ssh/download-via-ssh.cc b/src/download-via-ssh/download-via-ssh.cc index 0fa089724d7f..466233c7a5e5 100644 --- a/src/download-via-ssh/download-via-ssh.cc +++ b/src/download-via-ssh/download-via-ssh.cc @@ -101,6 +101,11 @@ void run(Strings args) std::cout << std::endl; + /* Pass on the location of the daemon client's SSH authentication + socket. */ + string sshAuthSock = settings.get("ssh-auth-sock"); + if (sshAuthSock != "") setenv("SSH_AUTH_SOCK", sshAuthSock.c_str(), 1); + string host = settings.sshSubstituterHosts.front(); std::pair pipes = connect(host); -- cgit 1.4.1