-
-
Save sendya/d3fe55cfb7f2b1489c912d35586d1b55 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-ssh-agent-with-gpg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment