在Windows上更新了git 版本后,clone/pull时出现错误,

unable to negotiate with *.*.*.*: no matching key exchange methodfound. Their offer: diffie-hellman-group1-sha1

解决方法:在执行git pull/clone之前,输入:

export GIT_SSH_COMMAND='ssh -o KexAlgorithms=+diffie-hellman-group1-sha1'  

这种方法每次打开git窗口,都要重新输入一次。

以在C:\Users\Spring\.ssh的config文件下,添加内容如下,[本人测试有作用]

Host *.*.*.*
KexAlgorithms +diffie-hellman-group1-sha1

 

 

参考:Git使用常见问题解决方法汇总

 

 

2、git创建分支后,本地关联远程分支

有时候创建分支后,本地分支关联的是另外一个远程分支

git branch --set-upstream-to=origin/remote_branch  your_branch

相关文章:

  • 2021-11-09
  • 2022-12-23
  • 2021-08-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-16
  • 2021-06-01
猜你喜欢
  • 2021-06-05
  • 2022-12-23
  • 2021-07-02
  • 2022-12-23
  • 2022-12-23
  • 2022-02-11
  • 2022-01-13
相关资源
相似解决方案