Skip to content

Instantly share code, notes, and snippets.

@felipe2g
Last active August 11, 2023 02:56
Show Gist options
  • Save felipe2g/d94da67cfe5f7dc3b7d400ad9c401369 to your computer and use it in GitHub Desktop.
Save felipe2g/d94da67cfe5f7dc3b7d400ad9c401369 to your computer and use it in GitHub Desktop.
1º passo: Crie a chave ssh.
ssh-keygen -t rsa -b 4096 -C "meu-email@email.com.br"
2º passo: Copie o conteúdo da chave.
cat ~/.ssh/id_rsa.pub
3º passo: Adicione a chave ao seu git.
Github: Profile > Settings > SSH and GPG keys > New SSH key
Gitlab: Profile > Settings > SSH Keys
*OPCIONAL*
4º passo: Inicie o agente SSH em background.
eval "$(ssh-agent -s)"
5º passo: Adicione a chave privada SSH ao agente.
ssh-add ~/.ssh/id_rsa
6º passo: Confirme que a chave foi adicionada com o resultado abaixo mostrado no console.
Identity added: /home/seunomedeusuario/.ssh/id_rsa (/home/seunomedeusuario/.ssh/id_rsa)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment