Skip to content

jitakirin/pkg-keychain

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 

Repository files navigation

Keychain helps you to manage SSH and GPG keys in a convenient and secure manner. Download and learn how to use Keychain on your Linux, Unix or MacOS system.

Keychain for fish (Oh-My-Fish / fisherman).

Install

Note: You need to have Keychain installed prior to adding it to fish.

Install Keychain using homebrew:

brew install keychain

or your distro package manager:

# Debian / Ubuntu
apt install keychain

# Fedora
dnf install keychain

# OpenSUSE
zypper install keychain

And add the package to your fish using Oh-My-Fish:

omf install https://github.com/jitakirin/pkg-keychain

or fisherman:

fisher jitakirin/pkg-keychain

Usage

The package adds a snippet into fish's conf.d directory so keychain is loaded automatically. By default keychain is started only with the --quiet option, but you can customise those by setting keychain_init_args variable, e.g.:

set -U keychain_init_args --quiet --confhost --timeout 60 --agents ssh,gpg

# to also load a key by default
set -U keychain_init_args --quiet --agents ssh,gpg id_ed25519

Note that --eval option is always passed to keychain so it generates output that can be sourced by the shell.

Note about $SHELL

Keychain (incorrectly) depends on the SHELL variable to decide on the format to output environment variables in.

This variable is normally set by login(1) based on shell set in the user's passwd entry and is meant to define user's preferred shell.

Although it may not be exactly right, given this is the only way to make keychain work correctly under fish, this function will launch keychain with SHELL set to fish.

This does not affect the environment outside of this function.

Still, given that there are other programs with this behaviour (e.g. docker-machine) if fish is not your login shell, you may want to set this variable to point to fish when running fish, like:

set -Ux SHELL $__fish_bin_dir/fish

License

MIT © Tom Hensel

About

🔑 Keychain package for Fish Shell

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Shell 100.0%