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.
请先登录再写评论。
Hi,
We have a workaround here: https://youtrack.jetbrains.com/issue/IJPL-72809/Github-with-multiple-accounts-support-ssh-alias#focus=Comments-27-4825039.0-0
Please check and let me know if you have any questions
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/
Yes, are you having issues with it?
I made above changes.
invalidated cache and restarted PHPStorm, and still cannot see the ‘Merge Requests’ icon :S
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
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.
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.
Hi,
Thank you for the update.
Let me know if you need additional help.