New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restore is not using stored credentials from nuget.config for VSTS feeds #2647

Closed
rrelyea opened this Issue Apr 22, 2016 · 4 comments

Comments

Projects
None yet
5 participants
@rrelyea
Contributor

rrelyea commented Apr 22, 2016

Our build machines are failing to restore packages from VSTS with the latest nuget.exe downloaded from https://dist.nuget.org/win-x86-commandline/latest/nuget.exe (3.4.3 published today)

We are storing the PAT token with the above NuGet.exe but during restore it still prompts. Surprisingly nuget.exe install seems to work.

We use the following command to store the credentials:
.\nuget.exe sources remove -Name Test
$PAT = "Your personal access token"
$Feed = "Your url"
.\nuget.exe sources add -Name Test -Source $Feed -UserName $Env:UserName -Password $PAT

Store-creds 3.3/Restore 3.3 works.
Store-creds 3.3/Restore 3.4.3 works.
Store-creds 3.4.3/Restore 3.3 does not work.
Store-creds 3.4.3/Restore 3.4.3 does not work.

@rrelyea rrelyea added this to the 3.4.3 milestone Apr 22, 2016

@yishaigalatzer yishaigalatzer modified the milestones: 3.4.3, 3.4.4 Apr 22, 2016

@rrelyea

This comment has been minimized.

Show comment
Hide comment
@rrelyea

rrelyea Apr 23, 2016

Contributor

@alpaix found that out settings Save code likely double encrypts encrypted strings in NuGet.config.

Contributor

rrelyea commented Apr 23, 2016

@alpaix found that out settings Save code likely double encrypts encrypted strings in NuGet.config.

alpaix added a commit to alpaix/NuGet.Client that referenced this issue Apr 25, 2016

Fixes source password's multiple re-encryption
Fixes NuGet/Home#2647.

Before the fix NuGet encrypted value stored in PasswordText on every save triggered by source update. Although it used to work just fine for first-time updated password, following saves caused the encrypted value to be encrypted again.

To resolve the issue and avoid confusion in future PackageSourceCredentials class made public to encapsulate password handling logic.

alpaix added a commit to alpaix/NuGet.Client that referenced this issue Apr 27, 2016

Fixes source password's multiple re-encryption
Fixes NuGet/Home#2647.

Before the fix NuGet encrypted value stored in PasswordText on every save triggered by source update. Although it used to work just fine for first-time updated password, following saves caused the encrypted value to be encrypted again.

To resolve the issue and avoid confusion in future PackageSourceCredentials class made public to encapsulate password handling logic.

alpaix added a commit to alpaix/NuGet.Client that referenced this issue Apr 28, 2016

Fixes source password's multiple re-encryption
Fixes NuGet/Home#2647.

Before the fix NuGet encrypted value stored in PasswordText on every save triggered by source update. Although it used to work just fine for first-time updated password, following saves caused the encrypted value to be encrypted again.

To resolve the issue and avoid confusion in future PackageSourceCredentials class made public to encapsulate password handling logic.

Added unit-tests for PackageSourceCredential
@rrelyea

This comment has been minimized.

Show comment
Hide comment
@rrelyea

rrelyea Apr 29, 2016

Contributor

Working with the internal reporter to confirm that this is fixed with this private build:
1.download not yet final version 3.4.4. of nuget.commandline.nupkg from https://www.myget.org/F/nugetbuild/api/v2/package/NuGet.CommandLine/3.4.4-rtm-870
2.rename the .nupkg to .zip
3.Grab nuget.exe from inside the zip file in the tools directory.
4.Try this version of nuget.exe to verify that it has fixed your issue.
5.Tell us how it went

Contributor

rrelyea commented Apr 29, 2016

Working with the internal reporter to confirm that this is fixed with this private build:
1.download not yet final version 3.4.4. of nuget.commandline.nupkg from https://www.myget.org/F/nugetbuild/api/v2/package/NuGet.CommandLine/3.4.4-rtm-870
2.rename the .nupkg to .zip
3.Grab nuget.exe from inside the zip file in the tools directory.
4.Try this version of nuget.exe to verify that it has fixed your issue.
5.Tell us how it went

@yishaigalatzer yishaigalatzer assigned jainaashish and unassigned alpaix Apr 29, 2016

@yishaigalatzer

This comment has been minimized.

Show comment
Hide comment
@yishaigalatzer

yishaigalatzer Apr 29, 2016

Reopening for validation

yishaigalatzer commented Apr 29, 2016

Reopening for validation

@jainaashish

This comment has been minimized.

Show comment
Hide comment
@jainaashish

jainaashish Apr 30, 2016

Contributor

Verified with 3.4.4-872 by adding sources through nuget.exe sources with username n pwd and then used these sources to browse/install packages.

Contributor

jainaashish commented Apr 30, 2016

Verified with 3.4.4-872 by adding sources through nuget.exe sources with username n pwd and then used these sources to browse/install packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment