- git客户端输入ssh-keygen -t rsa -C "你的邮箱地址"
-
Enter file in which to save the key (C:\Users\Administrator\.ssh\id_rsa): #不填直接回车
Enter passphrase (empty for no passphrase): #不设置密码直接回车
Enter same passphrase again: #不设置密码直接回车
Your identification has been saved in C:\Users\Administrator\.ssh\id_rsa. #生成的密钥位置
Your public key has been saved in C:\Users\Administrator\.ssh\id_rsa.pub. #生成的公钥位置
-
使用记事本打开C:\Users\Administrator\.ssh\id_rsa.pub
-
复制上述文件中的内容到gitee -->设置 -->ssh公钥
-
点击确定后,git客户端输入ssh -T git@github.com,跳出的对话框输入yes,随后跳出此代码则设置成功You've successfully authenticated, but GitHub does not provide shell access
-
设置成功后,git客户端输入git init
-
git add .
-
git commit -m "first commit"
-
关联远程地址 git remote set-url origin ssh地址
-
git push origin master
git ssh提交流程
最新推荐文章于 2024-08-03 17:04:26 发布