linux环境配置git认证

1. yum install git

2. 配置用户名和邮箱

git config --global user.name "wuta"

git config --global user.email "wuta@163.com"

3. 添加邮箱

ssh-keygen -C "wuta@163.com" -t rsa

4. 生成公钥

(base) [wuta@dm45 ~]$ cat ~/.ssh/id_rsa.pub

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCvWPcPAorZODUbkVsL+oFxpsulOycPMorNiYgHdAx9KfGh4NlyECwasy5mECME7YXyEEAkhqw7qFDTdaQ3usO5tGj+NyBGHknfJRG7BKae+fHGQJ7ME1RGT9u9dIHoNbzf4MdfV7ype7oI/R250OpTNsLRsY6ZddaPKkFPApZzYaqBPCiRCyQoppYYGDsr9Ynv0fTpzJ9XkKrrxrG3fQf9/37/68iHe2hnrMhh2MQsCzQJYOICHTOZmd5twNcr/l+LwOGF5wmX7UrLb1d2Zw/wrxaMiYAbOnC/+Ew00Ie2Q/zOBy4t5BF3heU63yWyDqpQQ3YSutOUY2asKk2oSH5r wuta@163.com

5. 将公钥复制到github

setting - SSH and GPG keys - 新建

6. 测试

(base) [wuta@dm45 ~]$ ssh -T git@github.com

The authenticity of host 'github.com (140.82.113.3)' can't be established.

ECDSA key fingerprint is SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM.

ECDSA key fingerprint is MD5:7b:99:81:1e:4c:91:a5:0d:5a:2e:2e:80:13:3f:24:ca.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'github.com,140.82.113.3' (ECDSA) to the list of known hosts.

Hi wuta! You've successfully authenticated, but GitHub does not provide shell access.

7. clone

git clone https://github.com/aidway/aibox.git

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

kangwq2017

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值