有时候遇到git拉取和提交需要经常输入账号密码的情况,为了解决该问题,可以配置ssh,一次配置,不用经常输入密码

1. 右键打开 git bash here(不限目录)

git 配置ssh链接

2. 执行ssh-****** -t rsa -C "邮箱地址",直接输入enter(不修改文件名),也可以在冒号后输入文件名

git 配置ssh链接

3.可以看到在用户目录下新增了两个文件

git 配置ssh链接

4.用记事本打开 .pub 文件,全部复制,内容如下:ssh-rsa XXXX

5.登录git网站,例如:https://gitee.com,在setting中可以找到ssh配置

git 配置ssh链接

6. 也可以点击删除:

git 配置ssh链接

7. 可以看到直接使用ssh可以拉取仓库

git 配置ssh链接

相关文章:

  • 2021-07-25
  • 2021-09-15
  • 2021-05-22
  • 2021-07-01
  • 2022-12-23
  • 2021-05-16
猜你喜欢
  • 2021-06-27
  • 2021-08-01
  • 2021-06-04
  • 2021-12-31
  • 2022-12-23
  • 2022-12-23
  • 2021-04-03
相关资源
相似解决方案