Skip to main content


Showing posts from February, 2024

How to generate an SSH Key to clone a Git repository using the SSH protocol

When you clone a remote repository using HTTPS, Git will prompt you for your username and password during the authentication process, on the other hand, when using SSH, Git uses your SSH key to authenticate, which means you don't need to send your credentials over the network.  Furthermore, SSH is a more secure method for cloning repositories, and working with the Git repos, as only the machines with the key file on disk can access these repositories. Even if the SSH key file was to be stolen, it wouldn't give access to the account itself (unlike the credentials) and can be easily revoked.  Creating an SSH Key To generate a new SSH key, open up your terminal app, i.e., Git Bash, and type the following; AzureAD+NurhakKaya@WAT607 MINGW64 / $ cd .ssh/ AzureAD+NurhakKaya@WAT607 MINGW64 /.ssh $ ls id_rsa AzureAD+NurhakKaya@WAT607 MINGW64 /.ssh $ ssh-keygen -t rsa -b 4096 -C "[email protected]" Generating public/private rsa key pair. Enter file in