Git初始流程
Git初始流程
SSH
1.生成ssh秘钥
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
2.设置ssh配置文件
不设置会导致 在执行
ssh -T git@github.com
命令时出现“ssh: connect to host github.com port 22: Connection timed out”错误
cd ~/.ssh
vim config #输入以下内容
Host github.com
User 注册github的邮箱
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443