How to Disable Git Credentials Manager on Windows (Visual Studio 2017) - windows

I got a question regarding Visual Studio 2017 and Git on Windows 7. In our environment, not every user has an individual Windows account as these machines are shared. Sadly, there is no way to change that fact. We are using Bitbucket for managing Git repositories. In this system, every user has its own login.
Because of this, it is very important for us to not save the credentials for each user within the system. Furthermore, we would like to easily switch between the different authors on every commit. The reason for this problem is the fact that the credentials and the actual author of a commit are not connected to each other. But this is a relatively minor issue.
What is more critical is the fact that Visual Studio is storing the credentials of each user to Windows' built-in Credential Manager as a "Generic Credential". This means even after a reboot of the system, the login is saved in Windows and Visual Studio does not ask for them anymore. This is a very critical issue to us. We have tried the following approaches on different systems to eliminate the chance of a local error:
Disable storing passwords in the Credential Manager using the Group Policy Editor: Did not work, because this does not disable storing generic passwords.
Remove the Git Credential Manager from all config files: Did not work in Visual Studio. When using any other Git client, this solves the problem.
Remove the Git Credential Manager executable from the program folder: Did not have any effect
Edit the Registry Key "disabledomaincreds" in the Registry: Did not have any effect
Disable the Credential Manager Service in services.msg: The application could not be started anymore, but Visual Studio still saved the credentials in it
I would appreciate any help regarding this topic. Thanks in advance!

Related

DefaultAzureCredential in Visual Studio dev fails to find a suitable user

This is a cool feature that allows an app to get a token via Environment value, visual studio Azure Service Authentication or via MSI if running on Azure. It automatically steps through and find one that works. Great if you are running locally and want to deploy to a web app with MSI later on. It acquires a token from MSI or Visual Studio and some other places
It had been failing unexpectedly when it was working. I have been working with MSFT on this and I figured out what is happening. I'll post an answer.
In Visual Studio, you set the account in the options/Azure Service Authentication/Account Selection ok.
If you debug locally and you have multiple Azure accounts registered in visual studio, you also have to set an environment variable in the webapp properties/debug (or your PC env vars) and adding the env variable AZURE_USERNAME and your selected account email to let it know which one to use.
Here is the problem - if the upper/lower case of your account id does not match the environment variable, it will not connect the two and will not use your visual studio account to authorize. An easy mistake if you add the env variable to the debug properties long after you registered visual studio accounts.
So - check the account on the tools/options/Azure Service Authentication/Account Selection and make sure the case of the AZURE_USERNAME variable is exactly the same.
The github issues is here and a fix is planned.
HTH. M.

TF30063:You are not authorized to access dev.azure.com but I can connect

I am using Azure Devops and VS2017 15.9.7.
I am logged into Devops and can sync.
When I open my project I get a message
"TF30063": You are not authorized to access dev.azure.com/myproject
I have tried going into credentials manager and deleting all the credentials for the devops organisation.
I have looked at this question and tried logging out via the browser within VS
TF30063:You are not authorized to access dev.azure.com but I can connect
I have encountered the same issue. (I need to switch back and forth between work account and test account). Of course, there could be so many reasons and it could be different for each (cached another account, or modified the password).
To resolve this issue I have two methods/steps.
Step 1 is to clear the credential from credential manager:
Go to Control Panel (with small icon view)-->User Accounts-->Manage your credentials (on the left column)-->Select Windows Credentials-->Scroll down to the Generic Credentials section and look for your TFS server connection.
Step 2 is to click on the operation that Connects to the Team Projects which is the button/plug icon in the Team Explorer tab. Then to also right click the project you are getting this issue on and select Connect:
I also have tried other methods but not work for me, if possible, you can check if it is useful to you:
How To Fix TF30063 Error
Error TF30063: You are not authorized to access
The comment by Kirsten Greed in the accepted solution resolved the issue for me. Reproduced here:
The problem was that I was opening the project using the Recent Project section of the start page. I closed VS, re-opened and then opened the project via "connect: in Team Explorer. Then exited. Now it seems to open ok either way.
I had the same issue, It solved by simply rerunning the Visual Studio as Administrator.
Running this command in cmd prompt, forces the re-authentication screen to come up and worked for me:
tf.exe get . /r
NOTE: you may need to locate tf.exe on your disk. For instance I have it at this location: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe
Another reason for this error is that you might have to re-enter your credentials in Visual Studio:
Restarting Visual Studio and connecting to Azure DevOps did the trick for me.
If the is problem like below:
The solution will be like below:
And after that select:
Re-enter your credentials
Step 1: Add
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer" in the environment variable path
Step 2: remove azuredevops org related credential from credential manager
Step 3: Delete this folder:
C:\Users<UserName>\AppData\Local\Microsoft\Team Foundation\7.0\Cache
Step 3:
run tf workspaces /collection:https://dev.azure.com/royalmailgroup in cmd
It might be the case of a password change.
In my case I had update my account password in a different machine. So on machine #02 I went to Visual Studio > Account Settings. After the pop-up opened, there was a message to re-enter credentials.
Sometimes the password isn't updated across all used app/services and you have to enter that manually.
Hope that helps.
None of the other methods above worked for me. I tried this in visual studio 2022 and it worked.
Open the Developer PowerShell (search for PowerShell) and type in the following:
TF vc permission
This will bring up a login screen and allow you to log in.
After that you should have permission.
In Visual Studio>Navigate to Tools > Nuget Package Manager >Package Manage Settings>Azure Service Authentication>Verify/Change the account
Leo Liu's answer got me on the right track. My problem could have originated from having two different Azure DevOps accounts cached in Windows Credentials and Visual Studio started choosing which one to authenticate with at random.
Log out of both accounts in Windows Credentials.
(The Manage Connections window does not have access to source control now.)
Open up the Azure DevOps website and logout there.
Login on Azure DevOps website.
(Visual Studio's Manage Connections can access source control again.)
What did it for me was open VS without code and connect via Team Explorer, but then also it threw the same error and after some time I logged out of azure web and tried connecting via Team Explorer again and it worked.

Unable to get Visual Studio 2010 on Win7 64bit to remember Visual Source Safe password

Whenever I open a solution that is under VSS control, I get prompted for my password, even before I've tried to actually change a file. That never used to happen when we were on WinXP. I've spent several days searching and keep finding the same "solutions" but it never works. Here's what I've tried:
Adding my credentials to the Windows 7 Credentials Manager.
Adding SSUSER and SSPWD environment variables.
Having VSS use my network login name isn't an option.
Anyone got any other suggestions?
Create an AutoHotKey that automatically insert your password whenever VSS ask for it :-)

Getting Visual Studio 2010 to retain VSS password

I use Visual Studio 2010 with Visual SourceSafe 2005 for source control. Each developer has their own username/password for VSS access. I know how to configure Visual Studio to remember the login name but I cannot seem to find a way of remembering the password. Currently each time I open a project under source control I have to enter my password. A solution to this would save me hundreds of key presses per day!
A SourceSafe solution please - moving to VSN isn't possible.
I always configure VSS to use the network username for login.
To do this, open the VSS admin tool, open your VSS database and go to Tools|Options. Make sure this option is checked and you should be set.
I was looking for the same thing the other day but couldn't find the option in VS2010 - but Windows to the rescue (bear in mind that we're using TFS, but I can imagine it working for VSS too):
Windows 7 + Windows 2008 have the so called "Credential Manager" or . You can either start it via the Start Menu or via Control Panel > User Accounts > Credential Manager.
Here you can enter a new credential via "Add a generic credential" with your username / password information and Visual Studio will happily never ask for your user/pass again.
Of course your password could then be read out by someone having access to your local system / working on your local system.

Making Visual Studio TFS plugin store your credentials?

Every time I open Visual Studio 2008, I get a pop-up dialog prompting for my username and password ('Connecting to Team Foundation Server'). Presumably this is because I have my TFS server stored in the Team Explorer tab, in Servers, so it wants to connect to it on startup. In addition, this happens when I open a solution file whose solution is associated with TFS source control, for obvious reasons.
My problem is identical to that described in various places on the web, such as:
http://kevinsmi.wordpress.com/2009/10/07/getting-visual-studio-to-remember-your-tfs-credentials-on-windows-7/
http://social.msdn.microsoft.com/Forums/en-US/tfsgeneral/thread/186a469c-bc58-48c4-9db9-ffc2e0fedb11
http://hastobe.net/blogs/stevemorgan/archive/2008/08/25/stop-visual-studio-prompting-for-tfs-credentials.aspx
In all cases I can see, the suggested solution is to add the TFS server credentials to Windows' stored credentials. I'm using Windows 7, so I think the way you do that is in the Credential Manager.
Well, I've added the TFS server with my credentials to the 'Windows Credentials' list, and I still get the prompt for my username and password when I open Visual Studio 2008. Anyone have any ideas as to how I can get it to login with my credentials automatically?
UPDATE:
I added my TFS server's computer name, along with my username and password, into the Credential Manager (before I just had its IP address). Now, VS2008 does load without prompting me for credentials... but VS2005 still prompts me for them, even though it has the exact same server registered in Team Explorer! Whatsmore, the server registered in Team Explorer is the server's IP, which was already stored in Windows Credentials, rather than the server's name. So this is still a mystery. Could this be some registry setting peculiar to the VS2005 version of the Team Explorer source control plugin? Where in the registry could I find this potential setting(s)?
Did you even try to access TFS web site and enter your credentials to IE?
If you don't try, please try and check "Remember my credentials" checkbox.
I think this can solve your problem.
I found another way, check this article http://blogs.msdn.com/b/granth/archive/2010/10/17/getting-started-with-tfs-hosting-from-discountasp-net.aspx
and read Step 7,
may be this can be answer your problem.
For Visual Studio 2008, entering the credentials in the Credential Manager as I described above seemed to work.
I entered the server's IP address instead of its hostname in Visual Studio 2005 too, and at first it still prompted me for the username/password on startup. However, it has now stopped doing so. Maybe something needed to timeout? All I can say is, Visual Studio's TFS plugin works in strange (and undocumented) ways.
I had the same problem. The problem was that the TF-Server was not recognized being in the local intranet zone. So I added our TF-Server to the trusted sites in Internet Explorer settings and changed the user authentication in security level to automatically sign on with current username and password.

Resources