Last active
August 4, 2022 06:05
-
-
Save nikhiljohn10/d362a50f1968c455c073e2d2dc92c5d2 to your computer and use it in GitHub Desktop.
Github SSH Key Generation
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
| [[ "$1" == "" ]] && echo "Please give email id as argument" && exit | |
| ssh-keygen -t ed25519 -C "$1" | |
| eval "$(ssh-agent -s)" | |
| ssh-add ~/.ssh/id_ed25519 | |
| echo "Your Public SSH Key is:" | |
| cat ssh-add ~/.ssh/id_ed25519.pub | |
| git config --global user.email "$1" | |
| echo | |
| echo "Run following to config git:" | |
| echo " git config --global user.name \"Your Name\"" |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example:
(Replace hello@example.com with your email id)