Merge Requests Icon Not Showing

I am using Gitlab(Its self-Hosted Enterprise Edition) as my project's Repo and for some reason I cannot see the ‘Merge Requests’ button.

I have donw following:
1. Configured and authenticated My got User using Token (It works fine).
2.  I can perform Git Related action from the IDE without any problem.

Now following is the interesting part.
When I clone repos using ‘https’ url it works fine and I can see the Merge Requests button.
But when I clone the repository using SSH url then Merge requests button disappear.
Example urls are like below:


HTTPS: https://gitlab.companydomain.com/my-project.git

SSH: git@gitlab-ssh.companydomain.com/my-project.git

In PHPStorm when I check the ‘Remote’ for the project i can see its the SSH url.

So I am thinking since theauthentication is done againt the https url and project's remote is ssh url(since its cloned using ssh), thats why I cannot see the Merge Requests button.

Any Idea how can I fix it.
I want to keep using ssh and dont want to clone using https, since the local environment is built through Docker images, which are built through Gitlab CI/CD.

0

Hi, thanks for the reply.

so in my case it would look something like this.


~/.gitconfig:
Host company-gitlab
   HostName gitlab.companyname.com
   IdentityFile ~/.ssh/id_rsa


~/.ssh/config :
[url "company-gitlab/"]
   insteadOf = git@gitlab-ssh.companyname.com/
 

0

Yes, are you having issues with it? 

0

I made above changes.

invalidated cache and restarted PHPStorm, and still cannot see the ‘Merge Requests’ icon :S

0

Hi

"Tip from someone that migrated to .gitconfig hack. First change remote back to github.com (from "alias" defined in .ssh/config) THEN add entry to .gitconfig . Otherwise git will not change url and it will not work :)" 

Did you do this step, too?

I believe the remote name must match with the one in Settings | Version Control | GitHub 

0

yaps I tried that, and ‘Merge Requests’ button showed, restarted PHPStorm and the button disappeared :)

I will experiment a bit more with it and feels like this will work.
 

0

Hi, this is working perfectly now.
Thanks for the help.

after making the changes i had to set Remote to ‘gitlab.companyname.com’, then invalidate caches and restart PHPStorm.

0

Hi,

Thank you for the update. 

Let me know if you need additional help. 

0

请先登录再写评论。