Github "Sign in with browser" open localhost in browser, login fails #2521
Comments
Hi @iozcelik, I'm sorry you were experiencing this! Did you ever manage to get it to work? |
Sign in with browser never worked at my computer. |
Note: Adding this comment here to provide more information (as already added into #2509 ) Hi Team, Even I am facing this issue with GitHub extension with Visual Studio 2019. I have tried the above workarounds (uninstalling/reverting to previous version etc.) but no luck. I am able to sign-in successfully to GitHub on my browser but through extension, when I click on 'Sign in with your browser' option, it opens the browser with the below URL and it just keeps loading: Below is the error captured from Github Extension log:
|
Are you by any chance using a VPN? |
@jcansdale I tried and result is same. |
You tried with and without a VPN? |
When I open this issue, I tried without Vpn. After you asked, I tried with it. |
That's a shame. 😢 When the page fails to load: Could you try replacing Thanks! |
Hi @iozcelik, Another user was able to fix this by launching Visual Studio as Administrator before logging in, see #2550 (comment). Could you give that a try? 🙏 |
@jcansdale I will try as soon as possible. |
It doesn't work for me as well. I tried to run VS19 as an administrator but it doesn't resolve. With/without VPN makes no difference either. |
@avatar25 thanks for checking! Do you know if you've used any apps that run on localhost successfully? A quick check would to try using my TestDriven.NET extension: After installing the extension, you can right-click inside any method and |
I resolved issue by copying the link and opening it in Incognito Mode now i am able to login and load my repositories properly in the visual studio |
@dotnetgik interesting, thanks! I wonder why Incognito Mode was required? 🤔 |
I've faced the same problem with authorization as everyone above. So, I've tried to:
Also, I haven't seen if somebody mentioned before but I see in TeamExplorer my local repositories (not all of them, just from one specific folder - C:\Users\User\Source\Repos). However I can not look through or work with any of my remote projects. So, what should I do to make this extension work? |
@KyuuzoT I've just tried to connect via VPN - no result. |
Lool after I struggled for years.. I have found a Solution to This All you have to do is to change you Default browser on your machine to the one u have signed is with on github |
Hi @KyuuzoT, I'm sorry you've had such a hard time getting this to work! There was another suggestion here #2527 (comment).
Might that the the issue? |
Hi @jcansdale Yeah, I forgot to mention that I've already done this and still have no result. Also, I've been testing extension in it's current state on my computer for some time and found out that I could make commits, create branches, pull & fetch etc if I'll find project that fits my remote repo and open it from VS2019 directly. Also I can clone my remote repos via direct link instead of opening them, which is not conveniently, because I do not need several versions of one project in different folders on my local PC (I'm using version management system for this particular reason, right?). So I have functionality of this extension despite the fact that I still got the "unconnected" message and I still can not see any of my remote repos in VS2019 (I see only list of my local repos). What does it mean and how it works this way I have no idea at all. |
After update to lastest version the problem is fix for me. Now I can login. |
@iozcelik "the latest version" of what? VS or Git extension? |
@KyuuzoT "Visual Studio 16.8.2" but now I have lots of different problem :) |
@iozcelik Well, I'm facing this problem while being on VS 16.8.2 |
Hi @KyuuzoT (and anyone else having auth issues), I've just added a new subcommand Please can you try the following:
If everything went to plan, a list of repositories should appear. 🤞 Please let me know how you get on! |
Hi @jcansdale
on step №3. And I don't see neither a command nor the option 'set-token' in ghvs --help. |
Could you check that you installed version
The help page should look like this:
|
@jcansdale for me the fix with ghvs works. Thank you! With azure az login I have same issue, I use az login --use-device-code instead. |
I am having the same challenge. The GitHub link shows "This site can't be reached" Here is my output from ghvs G:>dotnet tool install -g ghvs --version 1.0.113-g022796defc Welcome to .NET 5.0!SDK Version: 5.0.101 TelemetryThe .NET tools collect usage data in order to help us improve your experience. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell. Read more about .NET CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry Installed an ASP.NET Core HTTPS development certificate.
|
This dialog is actually part of recent Visual Studio versions and isn't installed with GitHub for Visual Studio. Could you try using the |
I'm having the same problem in VS 2019 Preview Version 16.10.0 Preview 1.0. I've tried all of the suggestions and still no go. The logs contain this: 2021-03-15 17:47:01.507 [04260] INFO [67] GitHubPackage Initializing GitHub Extension v2.11.102.28613 in Microsoft Visual Studio 2019 Preview (16.10.31025.218) Prior to switching to preview, I just used the older version of the extension but now that's no longer possible in preview so I need a solution. What worked once was this #2521 (comment) but now that is no longer helping either. Any suggestions? |
@rmatejka I'm interested to know what happens if you uninstall the extension and try Visual Studio's built-in GitHub integration. See #2521 (comment) for instructions. Please let me know how you get on! |
This has been opened since June 2020 and still isn't fixed? What a joke. |
The same issue just different port: |
I finally determined what was causing this for me and how to fix it. I frequently run my application server on localhost. My application is hard coded to send the Easy solution - clear your browser history and cache (you don't have to clear cookies). And that's it. Correct solution for Microsoft - run the hook through HTTPS. |
Thanks a ton, this works for me finally! BTW just clearing browser cache works, no need to clear history |
This works for me |
Works in Edge also. edge://net-internals/#hsts |
What worked for me was deleting all my cookies and browsing history (From Microsoft Edge Browser) |
You can try 3 things for this issue
|
You can try 3 things for this issue try with Administrator mode of visual studio. |
Gracias!!! soluciones mi problema!! |
Thank you very much. I got the issue finally resolved with your suggestion. Well done! |
Thank you, this resolved the issue. |
Thanks this solution resolve my problem |
None of the proposed solutions seem to solve the problem for me. |
I never had a problem logging in, now I have. It was so much that I had to delete the chrome browsing history. solved |
The issue that I was facing was that github was redirecting me to localhost without adding the port number. I just added the port number as mentioned in ttaylor29 (42549) comment and it worked fine then. |
I can say that this fixed my issue as well. changed localhost to localhost:42549 and it connected without an further issue. |
This fix my issue, but, how can we map the port to automatically open in GitHub sign-In with browser for visual studio? |
worked for me also |
Fixed 42549 my issue THnks |
I found a workaround that worked for me. (update: it just looked like it authorized but did not) from GitHub website repository : Open with visual studio. A popup on visual studio should appear to login. Select the option to sign in with code. Enter the code into the webpage that opens and authorize Visual Studio. Never mind it just looked like it worked. the above comment solution worked (adding port 42549 to localhost) |
This is fixed my issue. |
Thank you - worked for me also. |
This happened to me as well. I tried different things from this and other threads and nothing worked. Firefox was the only browser taking me to GitHub login so I changed my default browser to Firefox so it would open from VS. It worked and logged me in. Maybe helpful to try the link in different browsers to find which one actually opens the site. |
In my case I had an issue with hsts as edge and chrome were trying ot use https to redirect to localhost. I just went to edge://net-internals/#hsts within edge and under Delete domain security policies I typed localhost. Then I retried logging in with VS and the authentication was successful. |
This is the solution that works for me too. |
Versions
What happened
Steps to Reproduce
Steps to reproduce the behavior:
Expected behavior
Open to a github.com adress
Screenshots
The text was updated successfully, but these errors were encountered: