How to clone a repository with SSH key

Assuming that you have already created your key and it is everything working you may want to clone a repository, but since you have your keys set in place it gives you an error, something like "fatal: Authentication failed for ....".

Here cause you must define the SSH key that you want to use, or git is unable to know who you are. Doing it is pretty simple.

You just have to define your SSH informations while doing the clone, before the path of your project, so you should not use http, here you have an example.

shell
git clone git@git-mycompany:/Path/Of/Your/Project
how to clone repo with ssh clone repositories with key ssh key clone repo
Expand your knowledge about this topic