ctaggart / SourceLink

Source Code On Demand
MIT License
357 stars 55 forks source link

Support for GitHub Company Domain URLs #319

Closed ebol2000 closed 6 years ago

ebol2000 commented 6 years ago

This appears to be the exact same problem highlighted here, but for GitHub rather than BitBucket: https://github.com/ctaggart/SourceLink/pull/278

Example: https://github.mycompany.com/myProject

ctaggart commented 6 years ago

@ebol2000 You can set the SourceLinkUrl property. If the server requires authentication, you will have to wait though for debugger support. It is a known issue.

ebol2000 commented 6 years ago

Thanks @ctaggart. Bummer, authentication required :).

LordMike commented 6 years ago

EDIT: My answer was in the above link.

hotchkj commented 6 years ago

I thought I'd ask the dumb question of whether anyone has proven out what needs to be in SourceLinkUrl for Github Enterprise, now that VS 15.7 is out. Does anyone know how to tell the debugger authentication is required?

I've done what minimal steps are suggested in VS 15.7's notes (Git Credential Manager for Windows installed, Github plugin installed, logged into that successfully) and I just get a load of login HTML each time.

All the URL variants I've tried (https://git.mycompany.com/MyOrg/MyRepo/raw/{commit}/* seemed the most promising based on what I've seen elsewhere) just return an HTTP 302 and then a 200 LDAP login page from our Github Enterprise. I was expecting VS to send a suitable token.

VS outputs:

Source Link errors:
This request was sent without authentication. If the server requires authentication, this may be the reason why the request fails.
ERROR: The request returned an unexpected mime type (text/html).
The file was not found with Source Link.

Edit: If I follow the link that VS lists in a browser where I'm authenticated, I get the source file, so it appears I have a right URL, but no luck getting VS to authenticate.

LordMike commented 6 years ago

I've been thoroughly pissed at VS 15.7 for promising authenticated sourcelink support - and then ONLY supporting Github.com and VSTS.

I imagine the entire thing is built as a URL check, "if host == github.com then auth", so there is no chance to have this work with others, until the feature is there. Maybe in VS 16... :|

ctaggart commented 6 years ago

Support is being built in to https://github.com/dotnet/sourcelink/ Specifically see https://github.com/dotnet/sourcelink/issues/43

hotchkj commented 6 years ago

Great to see this being built into dotnet. Thanks for all your work on this @ctaggart !