Last active
December 4, 2024 09:33
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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/ |
Updated the link, thanks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current link: https://rnorth.org/easier-gpg-agent-with-gpg/