【发布时间】:2021-02-20 02:28:41
【问题描述】:
我无法克隆或推送到我服务器上的存储库。
我有一个裸仓库,它位于目录home/user/test.git 中的一个目录user@host,我正试图通过git clone 访问它。我使用 ssh-add <pathtokey> 添加我的 ssh 密钥。它要求我输入密码。然后我就可以ssh user@host成功了。
但是,如果我尝试git clone ssh://user@host/~/test.git,我会得到:
Cloning into 'test'...
user@host: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
也试过
git clone ssh://user@host/home/user/test.gitgit clone user@host:home/user/test.gitgit clone user@host:/home/user/test.git
结果相同
我猜 git 凭据管理器没有拿起钥匙?
在服务器上/var/auth/log 说
Feb 20 02:25:36 xxxxx sshd[24674]: Connection closed by authenticating user XXXX x.x.x.x port 56433 [preauth]
- Git 版本:
git version 2.30.1.windows.1 - Git 凭据管理器:
Git Credential Manager version 2.0.318-beta+44acfafa98 (Windows, .NET Framework 4.0.30319.42000) -
git config -l举报credential.helper=manager-core - 尝试了
PowerShell和git bashshell,结果相同 -
user拥有 repo 的读取、执行权限
【问题讨论】:
标签: windows git ssh git-credential-manager