Reset NuGet credentials in VS2017 - nuget

I've specified wrong credentials, which then were remembered. How do I make NuGet forget it?

As SayusiAndo guessed, the credentials were stored in Control Panel -> Credential Manager. After removing of which everything works fine.
UPDATE:
Two gotchas (as #Jurri mentioned in the comments):
There may be two credentials to delete (Windows and Generic). The generic one, in my case, had "VSCredentials_" prefix.
Restart VS.

I ran into a situation where the NuGet credentials I entered into Visual Studio were not in my Credential Manager. Deleting the package source in Visual Studio, closing Visual Studio, reopening Visual Studio, and recreating the package source allowed me to re-enter my credentials.
Hence, if the credentials don't exist in the Credential Manager, it appears deleting the package source and closing Visual Studio may be sufficient to cause Visual Studio to forget the saved credentials.

For me this isssue happens if i updated my system password. I fixed this problem by updating the passwords.
Steps:
Go to Control Panel -->User Account -->Credential Manager
In window credentials section update the password of your artifactory with encrypted password.
In Generic Credential section update your generic password which starts with VSCredential_ prefix with encrypted password.
Close and open your visual studio & Rebuild your visual studio project.
You can get encrypted password from you artifactory site(JFrog) user profile section.

You can also try looking in %AppData%\..\Local\NuGet\v3-cache. Some credentials (or configuration pointing to the credentials) are stored in a subfolder that starts with a guid, then a dollar sign, then the feed address. In my case I needed to reset my credentials for the Telerik feed, and the folder was named:
9908746e042bf0f6edf045e1c69a504b09f96883$https_nuget.telerik.com_nuget
I merely deleted the folder, restarted VS, and was asked to enter my credentials.

At least for Visual studio 2017 besides cleaning up credential cache - it does makes sense to wipe up nuget cache folder, as it keeps nuget packages downloaded locally - and then will not try any remote connection while restoring.
Run following two commands from command prompt, after that nuget authentication will be removed:
del /f "%localappdata%\MicrosoftCredentialProvider\SessionTokenCache.dat"
rmdir /s /q "%localappdata%\NuGet"

You can delete your credentials from the Credential Manager or force update the package reference by executing the following command in the Package Manager Console: dotnet nuget update source "your package name" -s "your package source/url" -u "your username" -p "your password/token"

I had to go into the credential manager and remove the machine name, i.e. in Cred Mgr my
User Name was: 10.4.4.4\username
needed to edit back to:
User Name: username

Related

Hosting Nuget packages on a network folder/share

I have a network share that I dropped a nuget package I created into. I configured Nuget in VS2010 to add the share as a package source. However when I select it, it shows no packages.
If I have the package in a local folder, it works fine.
Any clues?
Easy enough to test. Open Windows Explorer using the same credential you use with VS2010 and point to the nuget share. If you can see packages there, then you should see them in VS2010 also. If you can't see the files in Windows Explorer - then check the permissions as #PHeiberg suggests and make sure you have list and read. Since groups are probably in use, search for your login from effective permissions as in this screenshot:

Wait on the database engine recovery handle failed

I have been trying to install sql server 2008 r2 at my local machine and at the end of the installation i got this error "Wait on the database engine recovery handle failed". The Wizard shows progress in which some of the components including Database Engine could be not be installed.
I need some help related to this.
This issue can pop up for a few different scenarios. Do check the logs for error.
One of the scenario when this error can occur if a Microsoft® system folder is either missing or lacking the correct permissions.
Please use the following steps:
1.Click the Windows® Start button and click Run.
2.Type %appdata% and click OK.
3.Browse to the Microsoft folder.
4.Locate the Protect folder to assign the correct permissions:
Note: If the Protect folder is missing from the Microsoft folder, you will need to create it in this location by right-clicking and selecting Folder. Ensure to name the folder "Protect."
1.Right-click on the Protect folder and select Properties.
2.Click on the Security tab. Ensure the System and your logged on Windows User account is listed and both have Full Control.
3.Click Add to begin adding the accounts. For Windows Vista®/Windows 7, you will need to click Edit first.
4.In the "Enter the object names to select" box, type the word System, and press Enter on your keyboard. The System account should be listed
now. Select System from the user names list and select Full Control
under the Allow column. Click Apply .
5.Follow steps 3-4 to find, add and assign Full Control permissions also for you logged on Windows User account.
6.Click OK
.
Attempt to install SQL Server 2008 R2.
Even if this does not solve your problem, you take a look at the msdn blog that provides a workaround for the install scenario and see if this fixes it?

Configuring SVN from PKCS12 files

When I started my current job, I was told to install the Subversive plugin for Eclipse, and given the URL of the repository to pull projects down from. My username and password were/are the same as my Active Directory credentials. So I installed the plugin, created a new repository (don't remember how, but it was easy to do), and have never looked back.
I am now being transitioned to a different team, who also use SVN for source control, but have it set up on a completely different server. I was asked to put in a ticket with the systems people to request access to this SVN server so I could access this other team's code.
The systems person assigned to my ticket just sent me the following email:
Attached are the pkcs12 files that are needed for your access to SVN on [svn.someserver.com]. You’ll need to put these files on your local systems and then add the following configuration to the ~/.subversion/servers file, for your SVN client. I just use the svn command on linux, so my home directory contains the .subversion directory and the servers file is in that directory. I will send your password separately.
Note: I have a Windows machine, so a part of my confusion may stem from the fact that the tech is on Linux and I am on Windows 7.
The attachment was a ZIP file that extracted two separate files:
foo.pem - a PEM file (?)
atannon - a "Personal Information Exchange" file (?); same as my username
The tech followed up with an email giving me my password in cleartext.
I checked my home directory and do not see a .subversion or .svn hidden directory anywhere. I am wondering if I need to follow his directions, but using my Program Files/eclipse/ directory instead.
So I have several questions here, all relating to how to configure SVN access in the manner prescribed by this systems tech:
Why was it so easy for me to get set up with the first SVN server when I started my job (just install the plugin and find the repo through Eclipse's Repo Explorer), and why does this server require so much configuration? I assume there are multiple methods for gaining access to a SVN server, and this 2nd team just uses a more lengthy setup method?
Can someone give me a super-quick rundown of what each of these files are and what purpose they serve? And why I need to install them locally on my system?
Where should I install these files? The tech wanted me to put them in my ~/.subversion directory, but I never created one because they only SVN client I ever installed was Subversive (through Eclipse)
I tried creating a new repository for [svn.someserver.com] in Eclipse. I supplied my username and the cleartext password the tech sent me and now it is giving me a dialog stating I need to "Provide authentication information", asking for SSL settings, and specifically a File and a Passphrase for the Client Certificate...would the files he sent me suffice for this? If so, perhaps the answer to my question above just requires knowing which files to point Eclipse to, and I don't have to install these files anywhere
I usually don't like to ask multiple questions inside of one giant question, but these are all so similatrly in nature, I didn't want to clutter SO with too many closely-related questionss.
Thanks in advance for any help here!
Why was it so easy for me to get set up with the first SVN server when I started my job (just install the plugin and find the repo through Eclipse's Repo Explorer), and why does this server require so much configuration?
First server have less paranoid (if have any at all) security settings, second was configured by Real Admin. Client-certificate authorization is most bullet-proof method
Can someone give me a super-quick rundown of what each of these files
are and what purpose they serve? And why I need to install them
locally on my system?
foo.pem is your Personal S/MIME certificate, which used for client authentication, which you have storelocally and link with repo's server. atannon (I think) contain password for certificate privatekey, which will be asked (TBT) at first operation with repo (or with all, if you don't cache password)
Where should I install these files? The tech wanted me to put them in my ~/.subversion directory
For Windows, $HOME-dir (~ in Tux-world) is C:\Users\<Your Username>\ (Win7) or c:\Documents and Settings\<Your Username>\ (WinXP). You have to find inside this tree servers file (and remember it's location for future). In case of my XP (with TortoiseSVN only, no any Eclipse)
Directory of c:\Documents and Settings\Badger\Application Data\Subversion
30.06.2010 09:02 <DIR> auth
02.01.2012 19:11 6 712 config
30.06.2010 09:02 4 400 README.txt
30.06.2010 09:02 7 832 servers
"Provide authentication information", asking for SSL settings, and specifically a File and a Passphrase for the Client Certificate...would the files he sent me suffice for this?
Yes, pem-file is certificate in PKCS12-format, atannon (I hope) - contain password for it

Removing SVN username and password from Eclipse does not work in Windows 7

I'm using Eclipse (Helios) 32Bit in Windows 7, with Subclipse 1.6.x.
I want to reset my SVN username and password. On the internet, I found the following steps:
Close Eclipse or RAD/WSAD
Navigate to the following directory replacing {User} with your Windows logon id.
C:\Documents and Settings{User}\Application Data\Subversion
Delete all files under the Subversion directory
Open Eclipse or RAD/WSAD
Synchronize with your SVN repository
If prompted click Accept Permanently to trust the certificate
When prompted enter your Subverion user id and password
These steps aren't working. When I open Eclipse again and synchronize with the repository, it doesn't ask for a username or password.
Other information:
I tried deleting the files in the Subversion directory, but when synchronizing, Eclipse creates a folder there again.
In another post I read about "deleting the .keyring file", but I couldn't find the location of this file.
In the Secure Storage contents tab, I only have this:
There are different possibilities where passwords could be stored in eclipse and subversion. The keyring file is stored in an installation of eclipse I have used with subclipse at <root>/eclipse/configuration/org.eclipse.core.runtime/.keyring. You should at least look if it exists there. The location of that file may be overriden by command line parameters, but that you would know. See the article "How to change Eclipse SVN plugin password" for some more information.
For another option, you could check:
Go into the Preferences by Windows > Preferences.
Select there General > Security > Secure Storage.
Go to the tab Contents and expand there the entry SVN.
You should see now a local cache of SVN related things that SVN can use to answer the password question for the server. Delete the entries that is cached for the location you want to login as a different user. Ensure that your subversion directory is cleaned as well:
Windows XP: C:\Documents and Settings\{User}\Application Data\Subversion
Windows 7: C:\Users\{User}\AppData\Roaming\Subversion\
And delete the .keyring file as well, if you find it.
I've found the fil containig my SVN credentials at ...\Eclipse\config\auth\svn.simple\
https://casecomplete.zendesk.com/hc/en-us/articles/200685197-Resetting-stored-Subversion-credentials
This worked for me. deleting all the files, in the svn.simple directory (for windows 7) deletes all the stored passwords. One will have to set them, while commiting content again, but that is obviously through the usual means.

How to change credentials for Hg repository in Eclipse?

This is exactly the same case as this one, but with Hg instead of SVN. I have MercurialEclipse installed, and I have changed the password of my remote repo. Now when I synch it fails.
I have not found any conf file in "C:\Documents and Settings\%USER%\Application Data..." about Hg.
I have deleted the .keyring eclipse file and restarted but still fails.
Eclipse 3.6.1 with MercurialEclipse1.6, on windows Vista
In reply to pyfunc (thanks):
I found an entry like this in .hg\hgrc:
[paths]
default = https://user:oldpassword#bitbucket.org/myprojectpath
so I changed to the new password and restarted eclipse, but still I get 'authorization failed'...
I finally found out a way to achieve this. If I select "Synchronize With" I get a dialog and I am able to insert the good values, so now I could synch!
This does not explain why changing values in .hgrc didn't work, but at least is solved now, although it would be nice to find out about the details...
Typically that is stored in .hgrc file. That is the user configuration file stores in the HOME directory. You should be able to change the password there.
As per the man page of Mercurial, there are some suggestions about the location of config file on windows.
1. <install-dir>\Mercurial.ini
2. HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial
3. C:\Mercurial\Mercurial.ini
4. %HOME%\Mercurial.ini or
5. %HOME%\.hgrc or
6. %USERPROFILE%\Mercurial.ini or
7. %USERPROFILE%\.hgrc
it could also lie in /.hg/hgrc
Finally found the config file after some digging... it's in ${workspace_location}/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.vectrace.MercurialEclipse
If you close Eclipse, open this file, and delete just the lines at the bottom starting with repo_, the settings you have saved for that repository (including credentials) should be cleared the next time you open Eclipse. You'll probably want to make a backup of the file just in case.
Since these credentials override whatever you have in your hgrc, deleting these should allow the repositories to authenticate with your global settings. You won't necessarily see the credentials in the username/password fields in Eclipse, but if you click Next/Finish anyway, it should work fine.