Skip to content

Instantly share code, notes, and snippets.

@TallonRain
Last active April 17, 2024 00:32
Show Gist options
  • Save TallonRain/2e6b876a0caacb705a68c6c7076bbb3e to your computer and use it in GitHub Desktop.
Save TallonRain/2e6b876a0caacb705a68c6c7076bbb3e to your computer and use it in GitHub Desktop.
Set up Fish Shell to use gpg-agent as the SSH agent for Yubikeys and other smart cards
# Add these contents to ~/.config/fish/config.fish
# If using Brew, config.fish is located in /usr/local/Cellar/fish/[version]/etc/fish/
# Generally recommend using the installer from https://fishshell.com instead of brew
# to avoid version updates overwriting the config file
# Start or re-use a gpg-agent.
gpgconf --launch gpg-agent
# Ensure that GPG Agent is used as the SSH agent
set -e SSH_AUTH_SOCK
set -U -x SSH_AUTH_SOCK ~/.gnupg/S.gpg-agent.ssh
# Credit and more info: https://rnorth.org/easier-gpg-agent-with-gpg/
@adityasrini
Copy link

@TallonRain
Copy link
Author

Updated the link, thanks

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