How to Using SSH Key on Github Project Existing ?

Subscribe dengan Account Google untuk mendapatkan News Letter terbaru dari Halovina !
How to Using SSH Key on Github Project Existing ?
Ngomongin Uang : Menjadi ‘Kaya’ Versi Kamu Sendiri

Ngomongin Uang : Menjadi ‘Kaya’ Versi Kamu Sendiri

Kekayaan sering kali bukan hanya soal uang atau status sosial. Kekayaan yang sesungguhnya bersifat sangat personal, karena setiap orang mendefinisikan kesuksesan dan kebahagiaannya dengan cara yang berbeda. Namun, apa pun definisi kekayaan bagi kamu, UANG adalah alat ukur dan kendaraan yang bisa membawamu mencapai tujuan. Karena itulah, memahami keuangan adalah hal yang fundamental dalam membangun kehidupan terbaik versi kamu.

Free Klik Disini !

If have you got a github project existing and you want using ssh key for push or pull data on repository. You can follow below steps for problem solving:

Environment variable GIT_SSH_COMMAND


From Git version 2.3.0, you can use the environment variable GIT_SSH_COMMAND like this:
GIT_SSH_COMMAND="ssh -i ~/.ssh/id_rsa_example" git clone example

Note that -i can sometimes be overridden by your config file, in which case, you should give SSH an empty config file, like this:
GIT_SSH_COMMAND="ssh -i ~/.ssh/id_rsa_example -F /dev/null" git clone git@github.com:example/example.git

Configuration core.sshCommand


Since Git version 2.10.0, you can configure this per repo or globally, using the core.sshCommand setting. There's no more need to use the environment variable. Here's how you clone a repo and set this configuration at the same time:
git clone -c "core.sshCommand=ssh -i ~/.ssh/id_rsa_example -F /dev/null" git@github.com:example/example.git
cd example/
git pull
git push

If the repo already exists, run:
git config core.sshCommand "ssh -i ~/.ssh/id_rsa_example -F /dev/null"

The configuration is saved in .git/config

Reference article : https://superuser.com/questions/232373/how-to-tell-git-which-private-key-to-use

Video :