Skip to content

Instantly share code, notes, and snippets.

@dmccombs
Created April 28, 2016 00:59
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dmccombs/6345e5b8319e3a060b64181c1784f567 to your computer and use it in GitHub Desktop.
Save dmccombs/6345e5b8319e3a060b64181c1784f567 to your computer and use it in GitHub Desktop.
A simple way to use the GNOME keyring for SSH key managment in fish shell
# Add this to the bottom of your config.fish file
# Set SSH to use Gnome keyring
set -gx SSH_AUTH_SOCK (gnome-keyring-daemon --start | grep "^SSH_AUTH_SOCK" | awk -F "=" '{print $2}')
@mamapitufo
Copy link

No need for grep: set -gx SSH_AUTH_SOCK (gnome-keyring-daemon --start | awk -F "=" '$1 == "SSH_AUTH_SOCK" { print $2 }').

@joWeiss
Copy link

joWeiss commented Feb 9, 2022

Even simpler: set (gnome-keyring-daemon --start | string split "=").

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