美文网首页
git 报异常:ssh variant 'simple' doe

git 报异常:ssh variant 'simple' doe

作者: 阿豪02 | 来源:发表于2018-11-27 17:42 被阅读0次
    一 问题发生背景

    git 升级到 2.16.x 版本之后,在 Android Studio 上去使用 git 命令以 ssh 方式去 fetch 远端的 branch。

    二 造成异常现象

    Android studio 报了一个异常,ssh variant 'simple' does not support setting port ,即 ssh variant 不支持端口号。

    三 分析原因

    使用 ssh 方式拉取代码的时候,使用的命令带有端口号。而在 git 2.16.x 版本上 ssh variant 需要手动设置为 ssh。

    四 解决方式
    • 在 git bash 输入命令 git config --global ssh.variant ssh
    • 对 git 进行降级处理
    • 在系统变量中添加:变量 GIT_SSH_VARIANT 值 ssh

    相关文章

      网友评论

          本文标题:git 报异常:ssh variant 'simple' doe

          本文链接:https://www.haomeiwen.com/subject/eqknqqtx.html