Created
July 8, 2024 13:17
-
-
Save walternascimentobarroso/f3fc73e5eea2b9ce0fffbb13aaae2d3a to your computer and use it in GitHub Desktop.
Revisions
-
walternascimentobarroso created this gist
Jul 8, 2024 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ #!/bin/bash # Gera uma chave SSH com seu email echo "Digite o seu email para gerar a chave SSH:" read user_email ssh-keygen -t ed25519 -C "$user_email" -f ~/.ssh/id_ed25519 -N "" # Adiciona a chave SSH ao agente SSH eval "$(ssh-agent -s)" ssh-add ~/.ssh/id_ed25519 # Exibe a chave pública echo "Aqui está a sua chave pública SSH. Copie e adicione-a ao seu GitHub:" cat ~/.ssh/id_ed25519.pub # Abre a página de adição de nova chave SSH no GitHub (macOS only) open "https://github.com/settings/ssh/new"