【Bug经验分享】SourceTree用户设置必须被修复/SSH 主机密钥未缓存(踩坑)

文章目录

更多相关内容可查看

配置错误问题原因

电脑太卡,曾多次强制关机,在关机前没有关闭SourceTree,导致配置错误等问题

配置错误问题解决

方式一:重置配置,自动修复(如果项目不多可选择这种方式,避免更多的麻烦)

方式二:手动修复(适用项目多,不想重新搞的)

  • 找到sourcetree缓存所在的对应路径:
bash 复制代码
...\AppData\Local\Atlassian\SourceTree.exexxxx
  • 删除该路径下Composition.cache和user.config文件(建议把多个缓存文件的都删掉)

    -

  • 重新启动sourcetree,此时会自动重新生成Composition.cache和user.config文件

主机密钥缓存问题原因

删掉了对应的缓存,如果之前配置的主机密钥的缓存也被删掉了,所以在push远端仓库的时候,SourceTree会报一个类似如下的问题

bash 复制代码
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的错误提示那里不能输入。

相关推荐
zkmall24 分钟前
企业电商解决方案哪家好?ZKmall模块商城全渠道支持 + 定制化服务更省心
大数据·运维·重构·架构·开源
绝不偷吃2 小时前
ELK日志分析系统
运维·elk·jenkins
朱包林3 小时前
day45-nginx复杂跳转与https
linux·运维·服务器·网络·云计算
孙克旭_3 小时前
day045-nginx跳转功能补充与https
linux·运维·nginx·https
工一木子3 小时前
URL时间戳参数深度解析:缓存破坏与前端优化的前世今生
前端·缓存
陌殇殇3 小时前
SpringBoot整合SpringCache缓存
spring boot·redis·缓存
Hacker_Oldv5 小时前
软件测试(功能、工具、接口、性能、自动化、测开)详解
运维·自动化
Java樱木5 小时前
使用字节Trae + MCP,UI 到网页自动化。
运维·自动化
无敌暴龙兽z8 小时前
离线环境安装elk及设置密码认证
运维·elk
好奇的菜鸟8 小时前
如何在 Ubuntu 24.04 (Noble) 上使用阿里源
linux·运维·ubuntu