环境:window
工具:git & TortoiseGit
- 下载安装以及配置环境变量 :略略略
- 创建Github账户:登录https://github.com/用自己的常用邮箱创建账户,用来管理自己的代码
- 打开Git-bash 输入:
ssh-keygen -t rsa -C "[email protected]" #连续三次回车,默认:/c/Users/Administrator/.ssh
- ·
- 在c盘,当前用户文件夹下,有个.ssh 文件夹,在里边 找到 id_rsa.pub文件,用记事本打开,复制其中的全部内容。
- 登陆你的GitHub账户,依次点击Account Settings > SSH Public Keys > Add another public key,把id_rsa.pub中的内容拷贝进去 。
- 成功添加
- 设置成功:
$ ssh -T [email protected] #校验访问 The authenticity of host ‘github.com (192.30.255.113)‘ can‘t be established. RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added ‘github.com,192.30.255.113‘ (RSA) to the list of known hosts. Hi lizeyun! You‘ve successfully authenticated, but GitHub does not provide shell access. #ok~
时间: 2024-10-19 01:26:13