为什么使用密钥身份验证登录到 nat 后面的 gitlab 不起作用

为什么使用密钥身份验证登录到 nat 后面的 gitlab 不起作用

我想在路由器后面使用 gitlab 进行密钥认证。出于某种原因,它没有这样做。
它已经使用命令 git clone 退出

> git clone https://git.example.org/me/project.git c:\Users\me\Documents\Workspace\project --progress
Cloning into 'c:\Users\me\Documents\Workspace\project'....
remote: HTTP Basic: Access denied
fatal: Authentication failed for 'https://git.example.org/me/project.git/'.

我目前已打开端口 80 和 443,其他哪些端口不需要打开?
gitlab 中是否有我忽略的设置?

答案1

这不是 NAT 问题。您无需打开任何端口。您可以顺利与远程 Web 服务器通信。

您没有尝试密钥身份验证;而是尝试 HTTP 基本身份验证。阅读错误消息。

通常,密钥认证意味着 ssh。那么您就不能使用 https://...,而是使用 user@hostname:...

相关内容