Last active
June 2, 2024 04:50
-
-
Save RichardBronosky/429a8fff2687a16959294bcee336dd2a to your computer and use it in GitHub Desktop.
Launch ssh-agent on boot (OSX macos)
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
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>ssh-add-a</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/bin/ssh-add</string> | |
<string>-A</string> | |
</array> | |
<key>StandardOutPath</key> | |
<string>/dev/null</string> | |
<key>StandardErrorPath</key> | |
<string>/dev/null</string> | |
<key>RunAtLoad</key> | |
<true/> | |
</dict> | |
</plist> |
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
#!/usr/bin/env bash | |
# Usage: | |
# curl -sSL https://gist.github.com/RichardBronosky/429a8fff2687a16959294bcee336dd2a/raw/install.sh | bash | |
# or: | |
# wget -qO- https://gist.github.com/RichardBronosky/429a8fff2687a16959294bcee336dd2a/raw/install.sh | bash | |
dest="$HOME/Library/LaunchAgents/" | |
url="https://gist.github.com/RichardBronosky/429a8fff2687a16959294bcee336dd2a/raw/AddSSHKeysAtLogin.plist" | |
mkdir -p "$dest" | |
cd "$dest" | |
curl -sLO "$url" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a great example of a login service!
A different approach solved my ssh-agent issues. I added global
IdentityFile
entries to~/.ssh/config
for each of my keys.Problem solved!
GitHub has also updated their documentation to include similar advice, but I found it necessary.