Restore ssh-agent initialize in ~/.profile

For two days I tried using gpg-agent to emulate ssh-agent, but it did not work
the same way as ssh-agent. For example, gcert stopped working. Also, when I
tried adding keys to ~/.gnupg/sshcontrol using `ssh-add ~/.ssh/id_rsa`, the
command failed.

While the concept of reusing gpg-agent for ssh-agent appeals to me...
- Fewer agent processes
- pinentry support
...in practice, it fell short of my expectations. Some or all of this may be
because I tried running this on a gLinux machine.
This commit is contained in:
William Carroll 2020-03-13 12:17:58 +00:00
parent 3c73f73517
commit 4509fb5e50

View file

@ -8,6 +8,12 @@ if [ -z "$DISPLAY" -a "$(tty)" = '/dev/tty5' ]; then
exec xinit -- vt05
fi
# I tried configuring home-manager to generate the ssh-agent init code (i.e. the
# code below), but it seems that the home-manager community support using
# gpg-agent to emulate the ssh-agent. I tried that, but I didn't fully
# understand the benefits.
eval "$(ssh-agent -s)"
# This fixes nixpkgs that rely on glibc-2.27, which allegedly breaks locale
# issues.
# See this thread for more details: https://github.com/NixOS/nixpkgs/issues/8398