1. Sourcetree主界面上,选择命令行模式

 

2. 在命令模式执行如下命令:

$ git config --global user.name "xxx"
$ git config --global user.email "xxx.mail@xxx.com"
$ ssh-keygen -t rsa -C “xxx.mail@xxx.com”
# 按3个回车,密码为空。

文件存放位置 ~/.ssh,如果是window的话就在:C:\Users\Administrator.ssh 下面

 

3. 配置SourceTree 的 SSH,工具 ->  选项 ->  一般:

(1)ssh密钥输入:C:\Users\Administrator\.ssh\id_rsa

(2)ssh客户端选择:openssh

 

4. 登录github,访问项目地址,Setting -> Deploy keys -> Add Deploy key,用记事本打开 C:\Users\Administrator\.ssh\id_rsa.pub,粘贴确定即可。

相关文章:

  • 2021-09-21
  • 2022-12-23
  • 2021-06-05
  • 2022-03-06
  • 2021-09-22
  • 2021-12-13
  • 2021-11-25
  • 2021-10-28
猜你喜欢
  • 2021-06-14
  • 2021-12-03
  • 2021-06-29
  • 2021-08-05
  • 2021-09-14
相关资源
相似解决方案