It looks like the code that decides what environment variables to pass on to git, used when trying the experimental eksctl enable repo command filters out the SSH_AUTH_SOCK environment variable.
https://github.com/weaveworks/eksctl/blob/191286ead564f30cd4ed75082111353a0d5edf42/pkg/git/git.go#L89
I'm using a Yubikey to store the private part of my ssh key, and filtering out SSH_AUTH_SOCK means this doesn't work at all.
For me, using gpg-agent as ssh-agent, a workaround is to create a /usr/local/bin/git with the following contents:
#!/bin/sh
if [ -z "$SSH_AUTH_SOCK" ] ; then
export SSH_AUTH_SOCK=/run/user/$(id -u)/gnupg/S.gpg-agent.ssh
fi
exec /usr/bin/git "$@"
But I think the preferred solution is to not filter out SSH_AUTH_SOCK.
It looks like the code that decides what environment variables to pass on to git, used when trying the experimental
eksctl enable repocommand filters out the SSH_AUTH_SOCK environment variable.https://github.com/weaveworks/eksctl/blob/191286ead564f30cd4ed75082111353a0d5edf42/pkg/git/git.go#L89
I'm using a Yubikey to store the private part of my ssh key, and filtering out SSH_AUTH_SOCK means this doesn't work at all.
For me, using gpg-agent as ssh-agent, a workaround is to create a
/usr/local/bin/gitwith the following contents:But I think the preferred solution is to not filter out SSH_AUTH_SOCK.