天天看点

Linux下安装和配置Git安装了解SSH

安装

如果要在 Linux 上安装预编译好的 Git 二进制安装包,可以直接用系统提供的包管理工具。在 Fedora 上用 yum 安装:

$ yum install git-core           

复制

了解SSH

https://www.jianshu.com/p/1246cfdbe460

一、查看机器内是否已存在SSH key pair

cat ~/.ssh/id_rsa.pub           

复制

二、新建SSH key pair

ssh-keygen -t rsa -C "[email protected]" -b 4096           

复制

一路回车

三、复制自己机器里的SSH到Git中

复制/.ssh/id_rsa.pub的内容到Git的SSH key里

四、是否生效(是否能访问到)

ssh -T [email protected]
(example.com是git的域名)           

复制