Git RStudio 中的 SSH 使用 GUI 按钮工作,但不使用 shell
Git SSH in RStudio works using the GUI button, but not using shell
我有一个连接到 GitHub 存储库的 RStudio 项目。我正在使用 SSH 身份验证,我可以提交 push/pull 使用 RStudio 的 GUI 没有问题。但是,当我尝试使用 shell 推送时,例如git push
或 git push -u origin master
我得到一个错误
Could not create directory 'c/Users/<user>/<path>/<reponame>/=/.ssh'
我查了很多相关的问题,但是none似乎解决了这个问题。为什么 gui 按钮达到了预期的结果,而上面的代码却失败了?如果我将身份验证更改为 https,我可以 push/pull 使用 shell,因此很明显它与 ssh 有关。
我在 Win10 上,使用 RStudio 1.1.383 和 Git 2.8.3.windows.1.
有什么想法吗?
检查您的 git config -l
是否有任何 SSH 相关设置。
还要检查您的环境变量(在 CMD 中键入 'set',或在 git bash 中键入 env
)。我会在您的 bash 会话中仔细检查 %HOME%
或 $HOME
的值。
我怀疑变量或配置的值不正确,其中包含“=
”。
如评论所示:
set HOME=%USERPROFILE%
changed the HOME path.
我有一个连接到 GitHub 存储库的 RStudio 项目。我正在使用 SSH 身份验证,我可以提交 push/pull 使用 RStudio 的 GUI 没有问题。但是,当我尝试使用 shell 推送时,例如git push
或 git push -u origin master
我得到一个错误
Could not create directory 'c/Users/<user>/<path>/<reponame>/=/.ssh'
我查了很多相关的问题,但是none似乎解决了这个问题。为什么 gui 按钮达到了预期的结果,而上面的代码却失败了?如果我将身份验证更改为 https,我可以 push/pull 使用 shell,因此很明显它与 ssh 有关。
我在 Win10 上,使用 RStudio 1.1.383 和 Git 2.8.3.windows.1.
有什么想法吗?
检查您的 git config -l
是否有任何 SSH 相关设置。
还要检查您的环境变量(在 CMD 中键入 'set',或在 git bash 中键入 env
)。我会在您的 bash 会话中仔细检查 %HOME%
或 $HOME
的值。
我怀疑变量或配置的值不正确,其中包含“=
”。
如评论所示:
set
HOME=%USERPROFILE%
changed the HOME path.