【问题标题】:git server refusing password or ssh-keygit 服务器拒绝密码或 ssh-key
【发布时间】:2026-02-20 07:10:01
【问题描述】:

我目前在家里有一个 git 服务器,用于设置多用户私有存储库,如下所示

/opt/git
/opt/git/me/..all my projects here
/opt/git/someotheruser/...all his/her projects here

我有 git-shell 就地,现在几个月后我试图从另一个盒子访问我的 repo,它不允许我这样做,所以我仍然可以从我的笔记本电脑推送所有这些,但只是无法使用我的新桌面连接到服务器。使用 ubuntu 和最新的 git 版本我需要做什么。

【问题讨论】:

  • 你遇到了什么错误?

标签: git ssh git-remote


【解决方案1】:

您的新机器具有不同的 SSH 密钥。您需要将 SSH 公钥从这台新机器上传到 git-shell,以便 git-shell 能够识别您。 (您可以根据需要拥有任意数量的 SSH 公钥。)

【讨论】: