git 报错及解决

  • 报错:fatal: refusing to merge unrelated histories====
    解决办法:git pull加上参数,如:git pull –allow-unrelated-histories

  • 报错:
    fatal: Unable to create '/Users/cag2050/Documents/eclipse_jee_workspace/spring_boot_demo/.git/index.lock': File exists.
    Another git process seems to be running in this repository, e.g.
    an editor opened by 'git commit'. Please make sure all processes
    are terminated then try again. If it still fails, a git process
    may have crashed in this repository earlier:
    remove the file manually to continue.
    原因:
    进程的同步互斥管理,是有资源上锁机制的。
    解决:
    删除提示的文件。

  • 报错:ECDSA key fingerprint is xxx
    $ ssh root@192.168.1.1
    The authenticity of host '192.168.1.1 (192.168.1.1)' can't be established.
    ECDSA key fingerprint is SHA256:8bZUeFxyoxL9oYhc5aAZjgSZ5CT1oGYEYoehN/OLEYY.
    Are you sure you want to continue connecting (yes/no)?

因为这是第一次登录,ssh无法判断远程的服务端是否是正确的,在这里如果有人中间截获了你的登录请求,并且模拟ssh服务端的话,你的密码就会泄漏(中间人攻击),所以ssh会询问你:远程服务端的指纹是:xxxx,是不是确定登录。
选择yes,ssh会把该服务端的信息存到本地的~/.ssh/known_hosts文件中,那么下次登录就不会再询问了。
这时候服务端会使用公钥对A字符串加密,然后传输到客户端,客户端使用私钥进行解密,得到的A字符串,然后对A字符串进行md5加密,服务端判断传回来的字符串是否正确,如果正确,直接登录。

posted on   cag2050  阅读(447)  评论(0编辑  收藏  举报

编辑推荐:
· 用 C# 插值字符串处理器写一个 sscanf
· Java 中堆内存和栈内存上的数据分布和特点
· 开发中对象命名的一点思考
· .NET Core内存结构体系(Windows环境)底层原理浅谈
· C# 深度学习:对抗生成网络(GAN)训练头像生成模型
阅读排行:
· 手把手教你更优雅的享受 DeepSeek
· AI工具推荐:领先的开源 AI 代码助手——Continue
· 探秘Transformer系列之(2)---总体架构
· V-Control:一个基于 .NET MAUI 的开箱即用的UI组件库
· 乌龟冬眠箱湿度监控系统和AI辅助建议功能的实现

导航

点击右上角即可分享
微信分享提示