Open jonaskello opened 2 years ago
I'm getting this as well. I thought it might be a problem with the version of git-url-parse package that's being used. I wrote a test script and tried it with v11.1.1 (and a few other versions) of git-url-parse, but it never produced a url with /git
const gitUrlParse = require('git-url-parse');
const remote = 'git@gitlab.myorg.com:dev/group/project.git';
const gitUrl = gitUrlParse(remote);
const url = gitUrl.toString('https').replace(/(\.git)$/, '');
console.log('url:', url);
This produces https://gitlab.myorg.com/dev/group/project
without the extra /git.
So maybe it has to do with the remote url that's getting passed into get-url-parse?
In gitlab you can have a subgroup which makes the URL longer.
For example lets say we have
groupa
and under it a subgroupgroupb
. So it becomesgroupa/groupb
. Then the URL for a file in the repo/projectproject1
that lives ingroupb
would become something like this:However the plugin adds an extra
/git
in front of the url so it becomes:This results in a 404. Removing the
/git
prefix gives the correct page.