#每次都要重新配置,刚好又重新配置,就记录一下。以后看这里就行

 

1. 在git的安装目录下,用bash.exe打开

命令: 

ssh-keygen -t rsa -C 123456@qq.com

git ssh 配置过程

 

 2.  在github上粘贴生成的public秘钥

git ssh 配置过程

 

 打开id_rsa.pub文件将里面的内容粘贴到github的setting

git ssh 配置过程

 

 git ssh 配置过程

 

 3.测试连接  --第一次会让回答问题,输入yes,yes就行。

命令:

ssh -T git@github.com

git ssh 配置过程

 

 说明配置成功

 

4. 将工作空间git 初始化

git ssh 配置过程

 

 

5. 配置remote url

使用ssh重新配置remote url (使用ssh url)

命令:

git remote add "branchName"  git@github.com:lulu4pix/myspring.git

 git ssh 配置过程

 

 6. intellij设置git

git ssh 配置过程

 

 

自此,已经和平时工作的环境一样了。就平时一样commit push就行了。

 

 

第一次拉代码:

git clone url:

git ssh 配置过程

 

相关文章:

  • 2022-12-23
  • 2021-06-22
  • 2021-06-28
  • 2021-12-11
  • 2021-09-12
  • 2021-04-02
  • 2022-01-01
  • 2022-02-17
猜你喜欢
  • 2021-04-03
  • 2021-07-25
  • 2021-09-15
  • 2021-05-22
  • 2021-07-01
相关资源
相似解决方案