git/_ensure_ssh_key_loaded
- 462 bytes
- Bash
- View raw
1#!/usr/bin/env bash
2# This script should run before any Git operations that interact with
3# a remote; they ensure my SSH key is loaded by the macOS Keychain before
4# trying to push/pull anything.
6set -o errexit
7set -o nounset
11 ssh-add -l >/dev/null
12 }
14 if ! has_ssh_identity_loaded
15 then
17 fi
18fi