Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Microsoft Visual Studio asks for login endlessly

Microsoft Visual Studio Community 2019
Version 16.4.2

Every time, something changed in my local git repository (while solution is open), or i open another solution, or at random point of time Visual Studio asks me for login, i'm entering correct login pass, and VS asks for login again after 20 secods. The process repeats endlessly.

How to avoid this repeats for login, login just once and work for a log time?

tried this, but it doesn't help https://developercommunity.visualstudio.com/t/caught-in-a-login-loop/107160

like image 792
Maxim Kitsenko Avatar asked May 18 '26 13:05

Maxim Kitsenko


2 Answers

Login loop can happen if there is a Nuget package from a custom source. To verify whether this is the problem, go to

  1. Tools -> Nuget Package Manager -> Package Manager Settings -> Package Sources
  2. Copy and paste each source into a browser and inspect the result
  3. If it says something like User 'xyz' lacks permission to complete this action. you may need an Azure DevOps team to give you ReadPackages permission.

screenshot of nuget package sources

like image 181
SushiGuy Avatar answered May 20 '26 03:05

SushiGuy


I solve the problem by using credentials not from my VisualStudio, but from azure devops, where do we keep .sln

I don't know how these things are related, but it works (may be it's related to submodules some how, since few day ago we swtiched authentication for the from ssh to https. Another guess that it's because some of nuget packages are stored in feed and nuget tries to update packages source in a background.

UPDATE Yes, the problem was related to the fact .sln used nuget packages from feed, to access them you need to authorize

like image 34
Maxim Kitsenko Avatar answered May 20 '26 03:05

Maxim Kitsenko



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!