Open maxild opened 5 years ago
sourcelink test --help
Usage: test [arguments] [options]
Arguments:
path path to pdb, dll or nupkg
Options:
-f|--file <path> the path to a dll or pdb in a nupkg
-a|--use-auth <type> Use authentication. Defaults to Basic
-ae|--auth-encoding <encoding> Encoding to use on authentication value. Defaults to ASCII
-u|--username <username> Username to use to authenticate
-p|--password <password> Password for the username that is use to authenticate
-h|--help Show help information
I just looked at the code. Try adding a -a Basic
.
But basic is the default value, so does that change anything?
@ctaggart Doesn't work with explicit Basic (=> 404), but the Authorization HTTP header is of the form
Authorization: <type> <credentials>
but
sourcelink test .\artifacts\Brf.HisClientFx.0.2.0-aGH-6-0001.nupkg -a token -u personal_access_tokren
errors with Authentication type of token is not supported
I can also get
curl --header "Authorization: Basic base64('personal_access_token')" --location "https://raw.githubusercontent.com/maxild/HisClientFx/72acf10621facd60df91ef2f4ca2c9720e71e2b7/src/Brf.HisClientFx/Polyfills/ReflectionPolyfillExtensions.cs"
to work.
That is I base64 encode the ASCII(!) (not Unicode, unless UTF8...dotnet uses UTF16) representation of the token (or 'username:token' string...both work), but
sourcelink test .\artifacts\Brf.HisClientFx.0.2.0-aGH-6-0001.nupkg -a Basic -u base64(personal_access_token)
Invalid password value
Parameter name: password
Maybe the base64 encoding ring a bell. I have to leave, its late here.
@ctaggart BTW debugging in vs2017 works after adding , so the Visual Studio is able to authenticate with Github and download the (private) source...
Also the tool used to work with public Github repos for me, the only difference now I can't get it to authenticate with github
@ctaggart BTW debugging in vs2017 works after adding, so the debugger in Visual Studio is able to authenticate with Github and download the source...Also the tool used to work for me with public Github repos...
@maxild Sounds like it may be a bug in this app, so I'll reopen and take a look when I have time.
@ctaggart Oops didn't mean to close, glad you reopened it yourself:smile:
Just enabled SourceLink for a nupkg build with code in private github repo. Running the SourceLink V3 dotnet global tool
give me a lot of 404 errors
I can download source files with curl without getting 404 errors
We both now that requests that require authentication will return 404 on Github. So why does the tool fail to authenticate. Am I doing something wrong?