·
Firstly,
install the GIT from here https://git-scm.com/downloads
if you do not have already installed.
·
Next, we need to generate the SSH Keys before we configure for Git:
Open the Git Bash, and try the following
command:
$ ssh-keygen
Generating public/private rsa
key pair.
Enter file in which to save the
key (/c/Users/username/.ssh/id_rsa):
Either press Enter
to generate it on the above default location or you can specify it after colon
(: ) as per your preference - eg. /c/Keys/.ssh/id_rsa
And, enter the Passphrase
which will require for using git activities for authentication.
Enter passphrase (empty for no
passphrase):
Enter same passphrase again:
Your identification has been
saved in /c/Users/username/.ssh/id_rsa.
Your public key has been saved
in /c/Users/username/.ssh/id_rsa.pub.
The key fingerprint is:
d0:82:24:8e:d7:f1:bb:9b:33:53:96:93:49:da:9b:e3
username@mypc.local
To verify it, you can try typing below command:
$
cat
/c/Users/username/ssh/id_rsa.pubssh-rsa
AAAAB3NzaC1yc2EAAAABIwAAAQEAklOUpkDHrfHY17SbrmTIpNLTGK9Tjom/BWDSU
GPl+nafzlHDTYW7hdI4yZ5ew18JH4JW9jbhUFrviQzM7xlELEVf4h9lFX5QVkbPppSwg0cda3
Pbv7kOdJ/MTyBlWXFCR+HAo3FXRitBqxiX1nKhXpHAZsMciLq8V6RjsNAQwdsdMFvSlVK/7XA
t3FaoJoAsncM1Q9x5+3V0Ww68/eIFmb1zuUFljQJKprrX88XypNDvjYNby6vw/Pb0rwert/En
mZ+AW4OZPnTPI89ZPmVMLuayrD2cE86Z/il8b+gw3r3+1nKatmIkjn2so1d01QraTlMqVSsbx
NrRFi9wrf+M7Q==
username@mypc.local
Adding the SSH
Keys to Git for Authentication
$ ssh-add /c/Users/ username/ssh/id_rsa
To check the ssh-agent:
$
ssh-agent –s
To check the agent id:
$
eval $(ssh-agent)
To check agent identitiy
$
ssh-add –l
To check the Tunnelling:
$ ssh -T git@git.yourdomain.com OR your_git_repository_url
To clone the project
from GIT Repository
$ git clone git@git.yourdomain.com
or your_git_repository_url
Eg. your_git_repository_url = https://github.com/laravel/laravel.git
No comments:
Post a Comment
Please post any queries and comments here.