文章目录
- 配置错误问题原因
- 配置错误问题解决
- 主机密钥缓存问题原因
- 主机密钥缓存问题解决
更多相关内容可查看
配置错误问题原因
电脑太卡,曾多次强制关机,在关机前没有关闭SourceTree,导致配置错误等问题
配置错误问题解决
方式一:重置配置,自动修复(如果项目不多可选择这种方式,避免更多的麻烦)
方式二:手动修复(适用项目多,不想重新搞的)
- 找到sourcetree缓存所在的对应路径:
...\AppData\Local\Atlassian\SourceTree.exexxxx
-
删除该路径下Composition.cache和user.config文件(建议把多个缓存文件的都删掉)
- -
重新启动sourcetree,此时会自动重新生成Composition.cache和user.config文件
主机密钥缓存问题原因
删掉了对应的缓存,如果之前配置的主机密钥的缓存也被删掉了,所以在push远端仓库的时候,SourceTree会报一个类似如下的问题
git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks fetch --no-tags origin
The host key is not cached for this server:
gitee.xxx.work (port xxx)
You have no guarantee that the server is the computer you
think it is.
The server's ssh-ed25519 key fingerprint is:
ssh-ed25519 255 xxxxxxxxxxxxxxxxxxxxxxxxx+mpQE
If you trust this host, enter "y" to add the key to Plink's
主机密钥缓存问题解决
方式一:打开sourcetree->工具->选项,选择openSSH,重新提交试一下
方式二:Sourcetree会自带plink,用命令行切换到plink.exe所在路径,并执行plink git@github.com 命令,根据提示输入y 回车,问题就解决了。本质上是plink问玩家要y还是n,但是在Sourcetree的错误提示那里不能输入。