赞
踩
$ git config --global user.name "xxxxx"
$ git config --global user.email "xxxxx"
$ cat ~/.gitconfig
[user]
name = xxxxx
email = xxxxxx
[color]
ui = auto
$ git config --global color.ui auto
$ ssh-keygen -t rsa -C "xxxxx"
$ cat ~/.ssh/id_rsa.pub
$ ssh -T git@github.com
The authenticity of host 'github.com (13.250.177.223)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)?*输入yes*
如果提示需要输入秘钥
$ ssh -T git@github.com
Enter passphrase for key '/c/Users/xxxxx/.ssh/id_rsa':
可以使用以下密码把之前设置的密码设置为空,直接下一步直到完成。
$ ssh-keygen -p
Enter file in which the key is (/c/Users/xxxxx/.ssh/id_rsa):
Enter old passphrase:
Enter new passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved with the new passphrase.
再重新测试连接,连接成功
$ ssh -T git@github.com
Hi xxxxx! You've successfully authenticated, but GitHub does not provide shell access.
gitHub入门与实践
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。