github(4)——设置账户

it2022-05-05  121

学习github前的准备

1.创建账户2.设置 SSH Key3.添加公开密钥3.1查看公开密钥3.2设置公开密钥3.3设置成功

1.创建账户

在github上手动设置账户

2.设置 SSH Key

$ssh-keygen -t rsa -C "你的github注册邮箱" Generating public/private rsa key pair. Enter file in which to save the key (/Users/your_user_directory/.ssh/id_rsa): 按回车键 Enter passphrase (empty for no passphrase): 输入密码 Enter same passphrase again: 再次输入密码

3.添加公开密钥

3.1查看公开密钥

$ cat ~/.ssh/id_rsa.pub ssh-rsa 公开密钥的内容 your_email@example.com

3.2设置公开密钥

在github上手动设置

3.3设置成功

$ ssh -T git@github.com The authenticity of host 'github.com (207.97.227.239)' can't be established. RSA key fingerprint is fingerprint值 . Are you sure you want to continue connecting (yes/no)? 输入yes

出现如下结果即为成功。 Hi hirocastest! You’ve successfully authenticated, but GitHub does not provide shell access.


最新回复(0)