Overview
#apt-get install git-core
How to push/pull repos without password
On server
git@debian:~$ ssh - keygen - t rsa
Generating public / private rsa key pair.
Enter file in which to save the key(/ home / git / .ssh / id_rsa) :
Enter passphrase(empty for no passphrase) :
Enter same passphrase again :
Your identification has been saved in / home / git / .ssh / id_rsa.
Your public key has been saved in / home / git / .ssh / id_rsa.pub.
The key fingerprint is :
7e : 2e : 1d : f4 : 01 : d1 : ac : 95 : e4 : 99 : 80 : cc : 8b : 53 : 5d : 60 git@debian
The key's randomart image is:
+ -- - [RSA 2048]---- +
| o oEBo. |
| = .oo = o |
| o . ++ |
| o.o . |
| .S. . . |
| . . . |
| .... |
| .o. |
| .. |
+---------------- - +
git@debian:~$ cd.ssh
git@debian:~/ .ssh$ ls
id_rsa id_rsa.pub
git@debian:~/ .ssh$ cat id_rsa.pub >> authorized_keys
git@debian:~/ .ssh$ cat authorized_keys
git@debian:~/ .ssh$ chmod 600 authorized_keys
On client
$ scp git@192.168.2.171:/home/git/.ssh/id_rsa ~/.ssh/
$ cd ~/.ssh/
$ chmod 600 id_rsa