【发布时间】:2016-08-11 01:54:33
【问题描述】:
在新的 Windows 10 机器上设置开发环境时,我遇到了以下问题 - 我无法通过 WebStorm 克隆远程 git 存储库(版本 11.0.4 和 2016.2 - 都是评估)。
奇怪的是,我可以在同一台机器上使用 Windows 命令行成功克隆,而其他人在不同机器上使用 WebStorm 成功克隆相同的 repo。
Git 使用默认的 Windows 预设安装到默认位置 (C:\Program Files\Git),cmd 目录在 PATH 上,配置了用户名和电子邮件(我什至尝试过生成 SSH 密钥) - 而且,克隆工作再次正如命令行中所预期的那样。
repo 的 URL 是 [username]@[ip]:/var/www/git/[repo.git](repo 位于本地服务器上)。此 URL 已成功用于命令行克隆和其他机器的 WebStorms。
WebStorm git 设置是默认设置,具有正确的 git.exe 路径(在 cmd 目录中的那个),并且测试工作正常。尝试使用内置和本机变体。
尝试在 WebStorm 中结帐时,测试失败并显示 Test repository failed。
当打开通过命令行克隆的 repo 并尝试在 WebStorm 中更新时,结果如下:
Built-in mode:
16:26:06.446: cd [redacted]
16:26:06.446: git -c core.quotepath=false fetch origin --progress --prune
error: cannot spawn C:\Users\User\AppData\Local\Temp\git-ssh-0.bat: No such file or directory
fatal: unable to fork
Native mode:
16:26:24.404: cd [redacted]
16:26:24.404: git -c core.quotepath=false fetch origin --progress --prune
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,gssapi-with-mic,password).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我已经尝试了所有我能想到的巫术魔法(卸载、版本、UAC、进程、目录、PATH 魔法等),但没有任何帮助。
任何帮助将不胜感激 - 列表中的下一步是重新安装 Windows...:)
【问题讨论】:
-
澄清一下,您是否可以使用 WebStorm 克隆其他存储库,或者您是否遇到任何克隆问题?这可能与在应用中存储您的凭据有关。
-
在这台特定的机器上 - 没有来自同一台服务器。不过,没有从 GitHub 尝试。但是,我考虑了一下,禁用了在 WebStorm 中存储凭据的选项。