Can't connect IntelliJ-IDEA to GitLab with SSH

2020-02-26 03:31发布

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:

  • 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

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 Test Button it loads and loads and nothing happen after a while it give me this error: repository test has failed

3条回答
\"骚年 ilove
2楼-- · 2020-02-26 03:57

If you are you Windows and tried to clone a gitlab project and it failed, make sure to :

  1. Have setup a password in Gitlab (after registration, you'll need to create a password in your Account Setting)

  2. In Windows, access the Credential Manager

  3. Find Suppress gitlab accesses

  4. Retry cloning the project

For me, it worked!

查看更多
smile是对你的礼貌
3楼-- · 2020-02-26 04:02

Try to install plugin: Settings -> Plugins -> Browse repositories -> type GitLab Projects Plugin minimum version 1.3.0

and go to Settings -> Other Settings -> GitLab Settings

Fill GitLab Server Url with https://gitlab.com/ (ensure slash at the end) and

GitLab API Key with string (private token which is shown as the first thing on: https://gitlab.com/profile/account)

enter image description here

And then the test in IntelliJ IDEA will pass and you will be able to use ssh or https for each repository...

UPDATE: GitLab UI changed, so private tokens are created at https://gitlab.com/profile/personal_access_tokens

查看更多
我命由我不由天
4楼-- · 2020-02-26 04:08

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

查看更多
登录 后发表回答