git 无法使用 SSH 将 IntelliJ-IDEA 连接到 GitLab
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/31975143/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Can't connect IntelliJ-IDEA to GitLab with SSH
提问by Sebastian Garces
I am trying to connect my GitLab repository with IntelliJ-IDEA, and it still cant connect to the repo. I have tried the next things:
我正在尝试将我的 GitLab 存储库与 IntelliJ-IDEA 连接起来,但它仍然无法连接到存储库。我已经尝试了接下来的事情:
- I have msysgit installed correctly
- Generated the SSH keys (https://help.github.com/articles/generating-ssh-keys/)
- Added the key on GitLab keys
- Define the enviroment variables HOME USERPROFILE point to C:\Users\sebastian.garces.ssh. %USERPROFILE$/.ssh %HOME$/.ssh
- In IntelliJ changed SSH executable to Native
- 我已经正确安装了 msysgit
- 生成 SSH 密钥 ( https://help.github.com/articles/generating-ssh-keys/)
- 在 GitLab 密钥上添加了密钥
- 定义环境变量 HOME USERPROFILE 指向 C:\Users\sebastian.garces.ssh。%USERPROFILE$/.ssh %HOME$/.ssh
- 在 IntelliJ 中将 SSH 可执行文件更改为 Native
I did a lot of things from this links:
我从这个链接做了很多事情:
And many other google searchs
以及许多其他谷歌搜索
I dont know what else to do nothing is working.
我不知道还能做什么,什么都不做。
UPDATE:When i try to Clone the repository and press the TestButton it loads and loads and nothing happen after a while it give me this error: repository test has failed
更新:当我尝试克隆存储库并按下“测试”按钮时,它加载并加载,一段时间后没有任何反应,它给我这个错误:存储库测试失败
回答by fpopic
Try to install plugin:
Settings
-> Plugins
-> Browse repositories
-> type GitLab Projects Plugin
minimum version 1.3.0
尝试安装插件:
Settings
-> Plugins
-> Browse repositories
-> 输入GitLab Projects Plugin
最低版本 1.3.0
and go to Settings
-> Other Settings
-> GitLab Settings
然后去Settings
-> Other Settings
->GitLab Settings
Fill GitLab Server Url
with https://gitlab.com/
(ensure slash at the end)
and
填充GitLab Server Url
有https://gitlab.com/
(确保在最后的斜线)和
GitLab API Key
with string (private token which is shown as the first thing on: https://gitlab.com/profile/account)
GitLab API Key
带字符串(显示为第一件事的私有令牌:https: //gitlab.com/profile/account)
And then the test in IntelliJ IDEA will pass and you will be able to use ssh or https for each repository...
然后 IntelliJ IDEA 中的测试将通过,您将能够对每个存储库使用 ssh 或 https...
UPDATE: GitLab UI changed, so private tokens are created at https://gitlab.com/profile/personal_access_tokens
更新:GitLab UI 已更改,因此在https://gitlab.com/profile/personal_access_tokens上创建了私有令牌
回答by user7453089
The plugin worked for me after I found that a forward slash was missing after the .com in - GitLab Server Url with https://gitlab.com/OS - Mac IDE - IntelliJ Plugin - GitLab Projects Plugin HTH SK
在我发现 .com 之后缺少正斜杠后,该插件对我有用 - GitLab Server Url with https://gitlab.com /OS - Mac IDE - IntelliJ Plugin - GitLab Projects Plugin HTH SK
回答by Valérie Lemieux
If you are you Windows and tried to clone a gitlab project and it failed, make sure to :
如果您是 Windows 并尝试克隆 gitlab 项目但失败了,请确保:
Have setup a password in Gitlab (after registration, you'll need to create a password in your Account Setting)
In Windows, access the Credential Manager
Find Suppress gitlab accesses
Retry cloning the project
在 Gitlab 中设置了密码(注册后,您需要在帐户设置中创建密码)
在 Windows 中,访问凭据管理器
查找抑制 gitlab 访问
重试克隆项目
For me, it worked!
对我来说,它奏效了!