dotnet / dotnet/sourcelink

SourceLink generating incorrect URLs when configured with GitHub Enterprise URL

Open
#759 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.4k
Forks
148
PR merge metrics
No merged PRs in 30d

Description

I have a repository hosted on an internal GitHub Enterprise server. I've configured a .NET 5 solution to use Source Link by referencing the `Microsoft.SourceLink.GitHub` package version `1.0.0`. I've also manually configured all the properties required for reproducible builds (I am not using `DotNet.ReproducibleBuilds`). The `` property is set to `https://internal.ghe/org/project.git` (redacted).

According to NuGet Package Manager, my package was generated properly:

![image](https://user-images.githubusercontent.com/40613229/138954340-9203194b-a662-4c3c-ac49-4f4c9e91f2bc.png)

However, the URLs to each source file that are stored within my library's PDB cause a 404 when I try to navigate to them:

![image](https://user-images.githubusercontent.com/40613229/138954687-673089a2-9622-4c89-a39f-e6ed705b059e.png)

I am not sure what the correct URL should be, nor what the GUID in the URL represents. However, when I go to a file in the GHE UI and click the Raw button, the domain changes to `raw.internal.ghe`. I suspect the URL generation algorithm SourceLink uses needs to be tweaked.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.