git通過ssh管理用戶權限
ubuntu端:
$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/djy/.ssh/id_rsa): (回車生成默認文件/home/djy/.ssh/id_rsa)
生成公鑰文件/home/djy/.ssh/id_rsa.pub和私鑰文件/home/djy/.ssh/id_rsa。把公鑰給管理員注冊。
$git clone
[email protected]:znap.git
ssh自動識別剛才生成的私鑰,並和注冊的公鑰進行匹配。匹配成功即登錄成功。