Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't connect IntelliJ-IDEA to GitLab with SSH

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:

  • How do I connect IntelliJ to GitHub using SSH
  • How to store SSH host key in IntelliJ IDEA

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

like image 796
Sebastian Garces Avatar asked Aug 12 '15 20:08

Sebastian Garces


People also ask

Do I need SSH key for GitLab?

In order to communicate over SSH (Secure Shell), you must have an SSH key pair. Each SSH key pair has a public and a private key.

Could not read from remote repository in IntelliJ?

Please make sure you have the correct access rights and the repository exists. Using the built-in terminal of IntelliJ, executing git -c core. quotepath=false fetch origin --progress --prune , it works just as it should.


1 Answers

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

like image 70
fpopic Avatar answered Sep 23 '22 12:09

fpopic