赞
踩
$ yum install git
$ ssh-keygen -t rsa -C “your email address”
在命令行中输入
$ ssh git@github.com
会出现如下询问:
Are you sure you want to continue connecting (yes/no)?
键入yes
后回车,如果出现
Hi xxx! You’ve successfully authenticated, but GitHub does not provide shell accessConnection to github.com closed.
则说明验证成功,否则可能是上述步骤中的其中几步出错了,需重新来过
解决ssh: connect to host github.com port 22: Connection timed out
在.ssh目录下创建一个config文件,输入如下内容:
Host github.com
User xxx@163.com (你注册github时的邮箱,这里使用注册的用户名也行)
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。