我的 Gitea 版本是 1.2.3,它安装在 gentoo 专用服务器上。
我使用我的用户(不是 root 用户)在另一台专用服务器上创建了 SSH 密钥。
在 Gitea GUI 上,我创建了一个组织和该组织的存储库,我的 gitea 用户是所有这些的所有者(不是 root 帐户)
当我转到 [组织]/[MyRepo] > 设置 > 部署密钥时,我添加了远程用户的 ssh 密钥。
Gitea将该密钥添加到.ssh git用户中的authorized_key文件中(git用户是gitea的用户)
当我尝试时,从我的遥控器上:
ssh git@[gitea_server_ip]
我收到这样的消息:
Hi there, You've successfully authenticated, but Gitea does not provide shell access.
If this is unexpected, please log in with password and setup Gitea under another user.
所以 SSH 工作得很好,但是当我尝试推送或克隆时,我得到了:
git push -u origin master
Answer :
Gitea: Key permission denied
Cannot push with deployment key: 5
fatal: Could not read from remote repository
Please make sure you have the correct access rights and the repository exists.
这似乎是 gitea 身份验证问题,但我没有找到答案,谢谢。