linux环境配置git认证
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
更多推荐
所有评论(0)