【问题标题】:GitHub connected via Git Bash but not via Ubuntu Bash (WSL)GitHub 通过 Git Bash 连接但不通过 Ubuntu Bash (WSL)
【发布时间】:2023-02-08 17:19:40
【问题描述】:

我可以通过 PowerShell 或 Git Bash 将我的代码推送到我的远程 GitHub 存储库,但是当我尝试通过 Ubuntu Bash (WSL) 执行相同操作时,我收到以下错误:

C:\Windows\System32\OpenSSH\ssh.exe': 1: Syntax error: Unterminated quoted string
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.

【问题讨论】:

  • 展示完整的详细输出在 Ubuntu 下推送(不仅是错误消息)并且在检查使用的凭据之前 - 它们可能是错误的
  • 我已经用完整的消息更新了原始帖子。
  • 这看起来像是配置错误:某些东西(每个用户或系统配置文件?)将 core.sshCommand 定义为仅在 Windows 下有效的字符串,并尝试在 WSL 中使用它。

标签: git windows-subsystem-for-linux


【解决方案1】:

您需要使用此命令 - git config --global core.sshCommand /mnt/c/Windows/System32/OpenSSH/ssh.exe

【讨论】:

    猜你喜欢
    • 2021-06-18
    • 1970-01-01
    • 2014-08-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-07-14
    • 2020-10-20
    • 2021-02-03
    相关资源
    最近更新 更多