无法在正常用户帐户下使用cmd从远程GIT存储库克隆

无法在正常用户帐户下使用cmd从远程GIT存储库克隆,git,Git,我已经打开了cmd并运行了下面的命令 D:\x>git clone ssh://username@host/path/to/git/repositories/xModule.git 然后我得到了以下错误 "Cloning into xModule '... fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository

我已经打开了cmd并运行了下面的命令

D:\x>git clone ssh://username@host/path/to/git/repositories/xModule.git
然后我得到了以下错误

"Cloning into xModule '...
fatal: Could not read from remote repository.
Please make sure you have the correct access rights 
and the repository exists."
但是,如果我以管理员身份运行
cmd
,则上述命令工作正常,可以签出项目。
在我看来,我的普通用户帐户存在权限问题。
请有人解释一下,这背后的确切原因是什么

但是如果我以管理员的身份运行cmd,那么上面的命令工作得很好,可以签出项目

这意味着ssh能够在
%HOME%/.ssh/id\u rsa(.pub)
中找到正确的公钥/私钥

  • 检查cmd作为admin运行时的
    %HOME%
    外观,而不是cmd作为username运行时的外观
  • 查看a
    ssh-Tvvvusername@host
    以管理员身份在cmd运行中工作,而以用户名身份在cmd运行中不工作:这将确认关键问题

我找到了解决方案,它在我的案例中运行正常

开始---->用户帐户---->更改我的环境变量---->用户变量部分

定位到“用户变量部分”后,有两个用户环境变量,分别称为“SVN_SSH”和“GIT_SSH”。 请删除这两个,然后注销并再次登录到计算机

现在打开cmd并在git命令上方运行。这应该可以无缝地工作