This repository was archived by the owner on Jun 21, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 21, 2023. It is now read-only.
Report Solution for GHE Connecting Bug #2560
Copy link
Copy link
Closed
Description
Is your feature request related to a problem? Please describe.
-
I use GHE and when type GHE URL to VS GitHub Extension, doesn't appear ID/PW form.
-
Related issues
Couldn't find service of type GitHub.Api.ILoginManager #2450
Can‘t Login My Github Account #2465
unable to connect to GitHub using visual studio 2019 #2527
Way to solve
-
In my case, my GHE environment use with HAProxy. So I already know main reason is HAProxy
When disable HAProxy and use GHE directly, dose not occur this issue -
The reason is transforming to header values. See below responses
- response from
/site/sha- Only GHE
Server: GitHub.com
Set-Cookie: has_recent_activity=1; path=/; expires=Wed, 02 Sep 2020 06:34:51 -0000
Set-Cookie: _gh_render=BAh7B0kiD3Nlc3Npb25faWQGOgZFVEkiRWVlZDdjNTU5YzdlZDRhM2I1OGRh%0AOTAzMGZiNzIzN2NhMmNkYWM0NGY5Nzg2YmVlYzc4NTI3MDk4NjE4MDMyMDYG%0AOwBGSSIPdXNlcl9sb2dpbgY7AEZJIg1zLW1pbi1vaAY7AFQ%3D%0A--1e1e8463f4bef911f28b9a13cd0d6d15bf271cb2; path=/; expires=Sat, 02 Sep 2023 05:34:51 -0000; secure; HttpOnly
Status: 304 Not Modified
Strict-Transport-Security: max-age=31536000; includeSubdomains
Vary: X-PJAX
x-content-type-options: nosniff
x-frame-options: deny
X-GitHub-Request-Id: 1b9ae486-6b2e-4317-a938-6646cc70614e
X-Request-Id: d5921569-98f9-4e8f-897c-18fcfe6f3845
X-Runtime: 0.005104
X-Runtime-rack: 0.007666
x-xss-protection: 1; mode=block
- GHE with HAProxy
server: GitHub.com
set-cookie: has_recent_activity=1; path=/; expires=Thu, 03 Sep 2020 01:41:36 -0000
set-cookie: _gh_render=BAh7B0kiD3Nlc3Npb25faWQGOgZFVEkiRTJlNTA4Yzc2NTk2YzMxNGQ5ZDAy%0AMmNmYWQwZGM5YWQ2YTEyZGY0ODU1NWRlNzc5N2ZmNTQ1OGU5Yzk5NzYwN2QG%0AOwBGSSIPdXNlcl9sb2dpbgY7AEZJIg1zLW1pbi1vaAY7AFQ%3D%0A--8aee64da60eadd20e1322f05d1266e6b376ed3e1; path=/; expires=Sun, 03 Sep 2023 00:41:36 -0000; secure; HttpOnly
status: 304 Not Modified
strict-transport-security: max-age=31536000; includeSubdomains
vary: X-PJAX
x-content-type-options: nosniff
x-frame-options: deny
x-github-request-id: 9d2668b7-d944-4bfb-982b-a5a1b6526a54
x-request-id: 05fa4be4-d9bf-4c96-982b-52ec8b7fe020
x-runtime: 0.009405
x-runtime-rack: 0.012299
x-xss-protection: 1; mode=block
- Check GitHub Extension Source Code
There are no logic for disable case sensitive about checking header filed names
- https://github.com/github/VisualStudio/blob/master/src/GitHub.Exports/ExceptionExtensions.cs#L8
- https://github.com/editor-tools/octokit.net/blob/master/Octokit/Clients/Enterprise/EnterpriseProbe.cs#L106
- Also TC too
Just My Idea
Is good way to VS GitHub Extension support to receive case-insensitive values about header?
- My answer is Yes. See below documents. HTTP/1.1 header field names are follow case-insensitive rule.
https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2
Other solution (Best way!)
- HAProxy have option for keeping header field names
https://cbonte.github.io/haproxy-dconv/2.0/configuration.html#4.2-no%20option%20http-use-htx - It used this way and solved this issue
I hope it helps VS GitHub Extension.
Thank you!
Metadata
Metadata
Assignees
Labels
No labels
Activity
jcansdale commentedon Oct 26, 2020
Hi @osmanager 👋
Thanks for all the work you did to find and document this issue!
I've opened a PR with an attempted fix here #2562.
You can find a VSIX installer under the
Artifactslink here:https://github.com/github/VisualStudio/pull/2562/checks?check_run_id=1309274757
I was wondering if you might be able to install this VSIX and confirm whether or not it fixes the issue?
osmanager commentedon Oct 27, 2020
Dear @jcansdale
Thank you for sharing your PR
I have tested about your VSIX from https://github.com/github/VisualStudio/pull/2562/checks?check_run_id=1309274757
But this issue not fixed.
I think below line also need to update
https://github.com/editor-tools/octokit.net/blob/master/Octokit/Clients/Enterprise/EnterpriseProbe.cs#L106
Best Regards,
Seungmin Oh
jcansdale commentedon Oct 27, 2020
@osmanager,
I'm sorry I missed that in your issue! 😊
It looks like this was fixed in
octokit.nethere:octokit/octokit.net#2175
Unfortunately we forked
octokit.neta long time ago. I'll see about fixing our version.jcansdale commentedon Oct 27, 2020
Hi @osmanager,
I have a new build for you to try with the suggested change:
https://github.com/github/VisualStudio/pull/2562/checks?check_run_id=1316369778
osmanager commentedon Oct 28, 2020
Dear @jcansdale
Now, when type GHE URL, ID/PW form is appear.
But, Login button dose not work.
I attach images.
Type GHE URL, ID, PW

Immediately after click Login Button

On and after..

Thank you
jcansdale commentedon Oct 28, 2020
That's a shame. 😢
Did you also try the
Sign in with your browserlink?Could you have a look at the logs and see if there are any clues there?
You can find them here:
https://github.com/github/VisualStudio#logs
Thanks!
osmanager commentedon Oct 30, 2020
Thank you
jcansdale commentedon Nov 2, 2020
Thankyou!
It looks like we have a similar error where it can't find
X-OAuth-Scopes!https://github.com/github/VisualStudio/blob/master/src/GitHub.Api/LoginManager.cs#L349
jcansdale commentedon Nov 2, 2020
@osmanager,
I have a new build that should fix the
X-OAuth-Scopesissue. 🤞https://github.com/github/VisualStudio/runs/1343191255?check_suite_focus=true
Could you let me know if that works any better?
osmanager commentedon Nov 4, 2020
@jcansdale Great! Now I can see Repository list!
Also
Sign in with your browseis worked.👍