Last active
March 3, 2019 11:01
-
-
Save sheerlox/33ce089325f9e4a1633f71e00e90cf6a to your computer and use it in GitHub Desktop.
Fix for ssh-agent failing after disabling gnome-keyring in Ubuntu, execute after startup.
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
#!/bin/bash | |
SSH=$(ssh-agent -s) | |
SSH_AUTH_SOCK=$(echo "$SSH" | sed '2d' | sed '2d' | cut -d'=' -f2 | cut -d';' -f1) | |
SSH_AGENT_PID=$(echo "$SSH" | sed '1d' | sed '2d' | cut -d'=' -f2 | cut -d';' -f1) | |
export SSH_AUTH_SOCK; | |
export SSH_AGENT_PID; | |
ssh-add /home/sherlock/.ssh/github_rsa |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment