git push and unable to access Se
2019-03-07 本文已影响0人
多夏_zoey
1)终端下执行
ssh-keygen -t rsa -b 4096 -C "shifangfang0819@126.com" ----邮箱输入自己
2)Enter passphrase (empty for no passphrase):---随便输入一个密码
3)拷贝公钥
pbcopy < ~/.ssh/id_rsa.pub
2、Adding your SSH key to the ssh-agent
1)登录github点击右上角setting

2)add new ssh

3、测试SSH的连接
1)打开终端输入
ssh -T git@github.com
2)输入1里面设置的密码,看到如下内容表示成功
Hi herry-ff! You've successfully authenticated, but GitHub does not provide shell access.