Back
Syntax
Study
Editor
Mode:
HTML
CSS
JavaScript
PHP
Reset
Run »
HTML / CSS / JS
# Step 1: Generate an ED25519 SSH key pair (recommended): ssh-keygen -t ed25519 -C "jane@example.com" # Accept the default file location (~/.ssh/id_ed25519) # Set a passphrase for extra security (optional but recommended) # Step 2: Start the SSH agent and add your key: eval "$(ssh-agent -s)" ssh-add ~/.ssh/id_ed25519 # Step 3: Copy your PUBLIC key: cat ~/.ssh/id_ed25519.pub # Output looks like: # ssh-ed25519 AAAAC3Nza... jane@example.com # Step 4: Add the public key to GitHub: # GitHub -> Settings -> SSH and GPG keys -> New SSH key # Paste the public key content # Step 5: Test the connection: ssh -T git@github.com # Hi jane! You've successfully authenticated. # Step 6: Clone via SSH (not HTTPS): git clone git@github.com:jane/my-repo.git # Change an existing repo from HTTPS to SSH: git remote set-url origin git@github.com:jane/my-repo.git
Result
Open