Secure Shell is a cryptographic network protocol for operating network services securely over an unsecured network.Typical applications include remote command-line login and remote command execution,but any network service can be secured with SSH.
设置Git用user name和email
git config --global user.name "XXX" git config --global user.email "XXX@gmail.com"
生成密钥
ssh-keygen -t rsa -C "XXX@gmail.com"
中间连续3次Enter键.
测试SSH key是否设置成功
ssh -T git@github.com
出现下面提示直接输入yes.
The authenticity of host 'github.com (192.30.253.113)' can't be established. RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8. Are you sure you want to continue connecting (yes/no)? yes
输出如下,则表示通过.
Hi xxxx! You've successfully authenticated, but GitHub does not provide shell access.
使用时,会根据本地git密钥信息与git或者coding仓库密钥信息比对,本地上传时会提示登录。
Comments