无法使用 SSH 将 IntelliJ-IDEA 连接到 GitLab

Can't connect IntelliJ-IDEA to GitLab with SSH

我正在尝试将我的 GitLab 存储库与 IntelliJ-IDEA 连接,但它仍然无法连接到存储库。我尝试了接下来的事情:

我从这个链接做了很多事情:

以及许多其他 google 搜索

我不知道还能做什么都没有用。

更新: 当我尝试克隆存储库并按下 Test 按钮时,它加载并加载了一段时间后什么也没有发生给我这个错误:存储库测试失败

尝试安装插件: Settings -> Plugins -> Browse repositories -> 输入 GitLab Projects Plugin 最低版本 1.3.0

然后转到 Settings -> Other Settings -> GitLab Settings

https://gitlab.com/填充GitLab Server Url(确保斜杠在末尾)

GitLab API Key 带字符串(私人令牌,显示为第一件事:https://gitlab.com/profile/account

然后 IntelliJ IDEA 中的测试将通过,您将能够为每个存储库使用 ssh 或 https...

更新:GitLab UI 已更改,因此私有令牌创建于 https://gitlab.com/profile/personal_access_tokens

当我发现在 - GitLab Server Url with https://gitlab.com/ 中的 .com 后缺少正斜杠后,该插件对我有用 OS - Mac IDE - IntelliJ 插件 - GitLab 项目插件 HTH SK

如果您 Windows 并尝试克隆一个 gitlab 项目但失败了,请确保:

  1. 已在Gitlab中设置密码(注册后,您需要在帐户设置中创建密码)

  2. 在Windows中,访问Credential Manager

  3. 查找抑制gitlab访问

  4. 重试克隆项目

对我来说,它奏效了!

对于那些在从 Gitlab 拉出时努力克服身份验证问题的人。当然,您可以通过将密钥添加到 ssh-agent 通过命令行使其工作。但 IntelliJ 似乎并没有抓住这一点。

我 Git 通过使用凭据帮助程序来询问您并缓存凭据,从而在 IntelliJ 上工作。这是有问题的配置: