码迷,mamicode.com
首页 > 系统相关 > 详细

Linux - GIT

时间:2015-11-14 13:48:24      阅读:315      评论:0      收藏:0      [点我收藏+]

标签:

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

Linux - GIT

标签:

原文地址:http://www.cnblogs.com/iwasmu/p/4964220.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!