question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SourceLink with GitHub Enterprise LDAP appears to fail

See original GitHub issue

I’ve enabled a given internal Github Enterprise project with sourcelink (specifically 1.0.0-beta-63127-02). The sourcelink itself appears to be generated successfully.

When I load this package into a new console app made in Visual Studio 2017 Preview 15.8 with the new option Fall back to Git Credential Manager authentication for all Source Link requests enabled so that it will work with Github Enterprise, I get the following error from VS:

Source Link Error:
git-credential-manager.exe: Using credentials for username "myuser".
ERROR: The request returned an unexpected mime type (text/html).

Source Link URL: https://git.mycompany.com/raw/MyOrg/MyRepo/3875a6f3507fb3c4e5a727d49fe09328dba97a14/src/MyProject/MyFile.cs

It appears that the URL generated by sourcelink just returns a 200 response with a login page & a redirect.

image

Approximate URL is https://git.mycompany.com/login?return_to=https%3A%2F%2Fgit.mycompany.com%2Fraw%2FMyOrg%2FMyRepo%2F3875a6f3507fb3c4e5a727d49fe09328dba97a14%2Fsrc%2FMyProject%2FMyFile.cs

It’s unclear if this is a bug in SourceLink, Visual Studio or Github Enterprise. Advice appreciated on debugging this further or what we should correct to make this exciting integration work.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:33 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
JamieKeelingcommented, Aug 29, 2019

Any update on this?

2reactions
hotchkjcommented, May 31, 2019

@chuckries Is the potential to add header support to the Sourcelink protocol possible or a non-starter? As I understand it, this would require changes both on the Sourcelink side and inside VS & any other implementers.

I’m no Github expert, but it seems like this would be a win in several ways - Github API usage makes the API query for source consistent across Github & Github Enterprise, can use Basic Auth as expected, and it can’t be the only potential source that might need additional headers to access correctly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Incorrect source URI for GitHub.com and GitHub Enterprise
Looking for source using Source Link ([REDACTED])... Source Link errors: ERROR: The request failed with code 404 : "Not Found". Treating 404 as ......
Read more >
SourceLink Authentication error when using Microsoft. ...
I am trying to enable SourceLink for our internal NuGet packages and am running into a problem where I don't see how I...
Read more >
TFS authentication issues #207 - dotnet/sourcelink
We're trying to use SourceLink for TFS (on-premise using Git for source control). We're using Microsoft.SourceLink.Tfs.Git in one of our ...
Read more >
For github enterprise authentication is required when ...
In raw git github enterprise you can not have access to the raw file. ... SourceLink with GitHub Enterprise LDAP appears to fail...
Read more >
Support for GitHub Company Domain URLs · Issue #319
Source Link errors: This request was sent without authentication. If the server requires authentication, this may be the reason why the request ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found