Skip to content

Instantly share code, notes, and snippets.

@rkpontes
Created July 25, 2024 12:57
Show Gist options
  • Save rkpontes/9eeedfaa40b8e3539bce495a103127b8 to your computer and use it in GitHub Desktop.
Save rkpontes/9eeedfaa40b8e3539bce495a103127b8 to your computer and use it in GitHub Desktop.
Chave SSH para GitHub, GitLab ou Bitbucket

Chave SSH para GitHub, GitLab ou Bitbucket

1 - Criar uma nova chave SSH

ssh-keygen -t rsa -b 4096 -C "[email protected]"

Continue apertando enter sem inserir nada

Generating public/private rsa key pair.
Enter file in which to save the key (/Users/<user>/.ssh/id_rsa): <enter>
Enter passphrase (empty for no passphrase): <enter>
Enter same passphrase again: <enter>
Your identification has been saved in /Users/<user>/.ssh/id_rsa
Your public key has been saved in /Users/<user>/.ssh/id_rsa.pub
The key fingerprint is:

2 - Lendo a chave SSH

cat ~/.ssh/id_rsa.pub

Aparecerá algo como essa chave

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDEMh2ogrwtv8w5fMqyqy2SLlaRqnIsfhmXzLF169Amdmzss+FS0IGRGkqRM3e23kvknkr7nWIZM8b0ZF15i2FTej/d3yGJWbJHSuDHyBliWShFwRdHMTYEVqShC5KzDdACeo4Ohur149n68MdDghuIiry4+aicfrXZ2OM5oxK731Ni/LuK6lqGcGmyQa9c0iC0QlaZInyfAIxMUcXF+d2FhAcGIoEkxBMiL+uPMerAqmoTG7OOC61LIpuRrd/WFGIzJVO67QDHMPZuy1+Gogv2Qt+Lg4Q7EUlUiML0VoOO5X9JOD2RXfeCzLBvMFuyXQ2SiH9VR0VVbwaWPEYWFQ8H90o29phL48r8yBUPVidvdL0GU3Xgb5fZL7PaTUvMP39ctA6CIz3dGEgWHXR+8MiR4kc2xhsXvu2hOMV1vVDLItvw/Y50vabSEt9B/nE6Z4QOpbpvDVCa6QFPhUM3zVxPhNkhPHp3nl+dluL0OoArBMhNFlbEYAUhurSV2pgiH1ZQhWe1Gq1UoV0HWQwKmUF5SBFxpE7ispxwIbRL+3M87MRBKUKXQqEPtQrauqBsuDmH0msGdluchsgQMFVrNYH/sDYdDlf1W4Xzo4CnEjUdx+1/5yn530V7VZ2CdLA4M1ogYvzLpyaAFqKjMxBUdv0LfOx2zBbpItlrkejn+wqSuQ== [email protected]

Copie tudo e cole nas configs do github

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment