Skip to content

.NET GitlabSource is not compatible with self hosted gitlab instance #641

@thojaw

Description

@thojaw

OS

Windows

Programming Language

dotnet

VPK Version

vpk 0.0.1053

Library Version

Nuget 0.0.1053

What happened?

When using and debugging class GitlabSource, I was always receiving "401 Unauthorized" while using a correct token, and then I found out that my token wasn't even used. So I checked the source code and stumbled upon this:

GitlabSource.cs:156 -> Method: GetReleases(...)

var releasesPath = $"{RepoUri.AbsolutePath}/releases?per_page={perPage}&page={page}";
var baseUri = new Uri("https://gitlab.com");
var getReleasesUri = new Uri(baseUri, releasesPath);

My RepoUri has the correct server https://mygitlab.mydomain.com/ but it gets overridden with gitlab.com which obviously doesn't host my releases.

Not sure if I will be able to contribute myself, by maybe someone can also have a look at this and enable self hosted gitlab support.

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions