Skip to content

Instantly share code, notes, and snippets.

@cleverca22
Last active January 30, 2020 14:40
Show Gist options
  • Save cleverca22/ef075e5dfe092fa6b08cec0ae1dfde66 to your computer and use it in GitHub Desktop.
Save cleverca22/ef075e5dfe092fa6b08cec0ae1dfde66 to your computer and use it in GitHub Desktop.
[clever@amd-nixos:~]$ sudo socat UNIX-LISTEN:/tmp/hax,fork,mode=0070,group=nixbld UNIX-CLIENT:$SSH_AUTH_SOCK
[clever@amd-nixos:~]$ touch /tmp/ssh-config
[clever@amd-nixos:~/AEDB]$ nix-build default.nix -I ssh-auth-sock=/tmp/hax -I ssh-config-file=/tmp/ssh-config
with import <nixpkgs> {};
fetchgitPrivate {
url = "user@example.com:apps/repo/project_git";
sha256 = "1jw7iapmkhz49wbv96jjy3x2qmdhz075q6haw6rzchgnd3vq1qp0";
}
@marvin2k
Copy link

it helps when the ssh-config file sets the following to prevent unexpected stopping:

cat << EOF > /tmp/ssh-config
Host *
    StrictHostKeyChecking=no
    UserKnownHostsFile /dev/null
EOF

@cleverca22
Copy link
Author

i prefer to fix the HostKey problems via programs.ssh.knownHosts on nixos, it lets you pre-add the hostkeys system wide

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment