Visual Studio自带Git故障解决

397 阅读1分钟

1、vs自带Git使用无权限,而TortoiseGit可以正常使用

image.png

原因:VS的安装程序中的Git配置中的ssh问题,我是因为更新的VS的版本导致的。
解决方案:找到VS的《安装路径》/Microsoft Visual Studio\《安装版本》\《专业版或社区版》\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\etc\ssh\ssh_config

image.png 修改ssh_config文件,在末尾增加

Host *.coding.net
    HostkeyAlgorithms +ssh-rsa
    PubkeyAcceptedAlgorithms +ssh-rsa

即可解决!

2、本电脑的Git均无权限,包括TortoiseGit

原因:Git的安装程序中的ssh配置问题。
解决方案:找到Git的《安装路径》\etc\ssh\ssh_config

image.png

修改ssh_config文件,在末尾增加

Host *.coding.net
    HostkeyAlgorithms +ssh-rsa
    PubkeyAcceptedAlgorithms +ssh-rsa

即可解决!