aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/README.md
diff options
context:
space:
mode:
authorbasbebe <git@bastianbeuttel.com>2021-01-10 14:57:54 +0100
committerbasbebe <git@bastianbeuttel.com>2021-01-10 20:01:55 +0100
commita65cdca19a5da1dd2f48d6d64e4d7f0ba4185d8f (patch)
treee49733ba7c2ad6e05252eae8ef9e7216e5744b95 /README.md
parentMerge pull request #225 from ZenithalHourlyRate/gpg-agent-forward (diff)
downloadYubiKey-Guide-a65cdca19a5da1dd2f48d6d64e4d7f0ba4185d8f.tar.gz
add fish config
Diffstat (limited to 'README.md')
-rw-r--r--README.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/README.md b/README.md
index 89b3d82..c2b6414 100644
--- a/README.md
+++ b/README.md
@@ -1983,6 +1983,13 @@ export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
gpgconf --launch gpg-agent
```
+If you use fish, the correct lines for your `config.fish` would look like this (consider putting them into the `is-interactive` block depending on your use case):
+```fish
+set -x GPG_TTY (tty)
+set -x SSH_AUTH_SOCK (gpgconf --list-dirs agent-ssh-socket)
+gpgconf --launch gpg-agent
+```
+
Note that if you use `ForwardAgent` for ssh-agent forwarding, `SSH_AUTH_SOCK` only needs to be set on the *local* laptop (workstation), where the YubiKey is plugged in. On the *remote* server that we SSH into, `ssh` will automatically set `SSH_AUTH_SOCK` to something like `/tmp/ssh-mXzCzYT2Np/agent.7541` when we connect. We therefore do **NOT** manually set `SSH_AUTH_SOCK` on the server - doing so would break [SSH Agent Forwarding](#remote-machines-ssh-agent-forwarding).
If you use `S.gpg-agent.ssh` (see [SSH Agent Forwarding](#remote-machines-ssh-agent-forwarding) for more info), `SSH_AUTH_SOCK` should also be set on the *remote*. However, `GPG_TTY` should not be set on the *remote*, explanation specified in that section.