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 382272420@qq.com

配置ssh公钥密钥:


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

ssh-keygen -t rsa -C  382272420@qq.com

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

打开公钥并复制:


cat /root/.ssh/id_rsa.pub

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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。