Linux git 基础配置

1 篇文章 0 订阅

【转】centos7编译安装git

1.配置用户名

git config --global user.name "yourname"

2.配置邮箱

git config --global user.email "youremail"

3.编码配置

git config --global gui.encoding utf-8

#避免git gui中的中文乱码

git config --global core.quotepath off

#避免git status显示中文文件乱码

windows上还需要配置:git config --global core.ignorecase false

4.git ssh key pair配置

4.1 ssh-keygen -t rsa -C "youremail"

4.2 然后一路回车,不要输入任何密码,生成ssh key pair

4.3 ssh-add ~/.ssh/id_rsa

(执行ssh-add时出现Could not open a connection to your authentication agent,

则先执行 eval `ssh-agent`,再执行 ssh-add ~/.ssh/id_rsa

ssh-add -l 查看新加的rsa了 )

4.4 cat ~/.ssh/id_rsa.pub

4.5 填写公钥

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值