2013.11.04——— git学习之生产key
2013.11.04———git学习之生产key
参考:http://blog.csdn.net/hustpzb/article/details/8230454
之前我们学习过设置全局变量gitconfig的命令,如果我们已经设置了name和email的话,就可以直接生成key了
$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/c/Users/Sun/.ssh/id_rsa): /c/Users/Sun/.ssh/id_rsa already exists. Overwrite (y/n)? y Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /c/Users/Sun/.ssh/id_rsa. Your public key has been saved in /c/Users/Sun/.ssh/id_rsa.pub. The key fingerprint is: d2:94:67:b3:2c:d9:42:95:56:75:d0:bf:0b:8a:5f:08 Sun@COSTARTER
它先要求你确认保存公钥的位置(.ssh/id_rsa),然后它会让你重复一个密码两次,如果不想在使用公钥的时候输入密码,可以留空
然后会在当前目录下(可以用pwd来查看当前目录路径)生成一个.ssh的文件夹,里面有两个文件,通常是id_dsa或者id_rsa。
其中,.pub文件是公钥,另一个文件是密钥
然后把公钥发给git管理员,这样就可以下载代码了
相关推荐
returnspace 2020-06-21
projava 2020-11-14
WanKaShing 2020-11-12
airfish000 2020-09-11
tryfind 2020-09-14
yegen00 2020-09-10
kkaazz 2020-09-03
风语者 2020-09-02
BraveWangDev 2020-08-19
lichuanlong00 2020-08-15
gsl 2020-08-15
pandaphinex 2020-08-09
yhuihon 2020-08-09
CheNorton 2020-08-02
xiangqiao 2020-07-28
hpujsj 2020-07-26
hpujsj 2020-07-26
sshong 2020-07-19
BraveWangDev 2020-07-19