Centos下 安装/使用 git 步骤


命令行安装git:


yum -y install git

验证是否安装成功:


git --versio

配置基本信息:


git config--globaluser.name"【名字】"

git config--globaluser.name andrewhsu

git config--globaluser.email 【github邮箱】

git config--globaluser.email [email protected]

配置ssh公钥密钥:


ssh-keygen -t rsa -C "【github邮箱】"

ssh-keygen -t rsa -C  [email protected]

一直回车,存放公钥的位置是/root/.ssh/id_rsa.pub

打开公钥并复制:


cat /root/.ssh/id_rsa.pub

npm i-g cnpm--registry=https://registry.npm.taobao.org

你可能感兴趣的:(Centos下 安装/使用 git 步骤)