Last active
November 12, 2019 20:51
-
-
Save David-Lor/7eaef0421bbebb3060acb9eac368a420 to your computer and use it in GitHub Desktop.
Setup Github SSH key
This file contains hidden or 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 | |
| set -ex | |
| ssh-keygen -f "$HOME/.ssh/github.priv" | |
| mv "$HOME/.ssh/github.priv.pub" "$HOME/.ssh/github.pub" | |
| echo "Host github.com" >> "$HOME/.ssh/config" | |
| echo " IdentityFile ~/.ssh/github.key" >> "$HOME/.ssh/config" | |
| echo "Public key:" | |
| cat "$HOME/.ssh/github.pub" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment