{"action":"created","issue":{"url":"https://api.github.com/repos/NuGet/Home/issues/2942","repository_url":"https://api.github.com/repos/NuGet/Home","labels_url":"https://api.github.com/repos/NuGet/Home/issues/2942/labels{/name}","comments_url":"https://api.github.com/repos/NuGet/Home/issues/2942/comments","events_url":"https://api.github.com/repos/NuGet/Home/issues/2942/events","html_url":"https://github.com/NuGet/Home/issues/2942","id":159483777,"number":2942,"title":"CoreCLR restore needs to ignore feeds with encryption","user":{"login":"billwert","id":4523120,"avatar_url":"https://avatars.githubusercontent.com/u/4523120?v=3","gravatar_id":"","url":"https://api.github.com/users/billwert","html_url":"https://github.com/billwert","followers_url":"https://api.github.com/users/billwert/followers","following_url":"https://api.github.com/users/billwert/following{/other_user}","gists_url":"https://api.github.com/users/billwert/gists{/gist_id}","starred_url":"https://api.github.com/users/billwert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/billwert/subscriptions","organizations_url":"https://api.github.com/users/billwert/orgs","repos_url":"https://api.github.com/users/billwert/repos","events_url":"https://api.github.com/users/billwert/events{/privacy}","received_events_url":"https://api.github.com/users/billwert/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NuGet/Home/labels/Type:Bug","name":"Type:Bug","color":"207de5"},{"url":"https://api.github.com/repos/NuGet/Home/labels/XPLAT","name":"XPLAT","color":"e11d21"}],"state":"closed","locked":false,"assignee":{"login":"zhili1208","id":7131513,"avatar_url":"https://avatars.githubusercontent.com/u/7131513?v=3","gravatar_id":"","url":"https://api.github.com/users/zhili1208","html_url":"https://github.com/zhili1208","followers_url":"https://api.github.com/users/zhili1208/followers","following_url":"https://api.github.com/users/zhili1208/following{/other_user}","gists_url":"https://api.github.com/users/zhili1208/gists{/gist_id}","starred_url":"https://api.github.com/users/zhili1208/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhili1208/subscriptions","organizations_url":"https://api.github.com/users/zhili1208/orgs","repos_url":"https://api.github.com/users/zhili1208/repos","events_url":"https://api.github.com/users/zhili1208/events{/privacy}","received_events_url":"https://api.github.com/users/zhili1208/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/NuGet/Home/milestones/37","html_url":"https://github.com/NuGet/Home/milestones/3.5%20Beta2","labels_url":"https://api.github.com/repos/NuGet/Home/milestones/37/labels","id":1792618,"number":37,"title":"3.5 Beta2","description":"","creator":{"login":"harikm86","id":10966488,"avatar_url":"https://avatars.githubusercontent.com/u/10966488?v=3","gravatar_id":"","url":"https://api.github.com/users/harikm86","html_url":"https://github.com/harikm86","followers_url":"https://api.github.com/users/harikm86/followers","following_url":"https://api.github.com/users/harikm86/following{/other_user}","gists_url":"https://api.github.com/users/harikm86/gists{/gist_id}","starred_url":"https://api.github.com/users/harikm86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harikm86/subscriptions","organizations_url":"https://api.github.com/users/harikm86/orgs","repos_url":"https://api.github.com/users/harikm86/repos","events_url":"https://api.github.com/users/harikm86/events{/privacy}","received_events_url":"https://api.github.com/users/harikm86/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":25,"state":"open","created_at":"2016-05-27T18:46:12Z","updated_at":"2016-06-10T18:34:52Z","due_on":"2016-06-27T07:00:00Z","closed_at":null},"comments":7,"created_at":"2016-06-09T19:03:16Z","updated_at":"2016-06-10T18:34:52Z","closed_at":"2016-06-10T18:34:52Z","body":"When a user adds a Nuget feed so they can push to it, VSTS will instruct them to run a command like this:\r\nnuget sources add -name \"TestFeedForBug\" -source https://thiswouldbemyfeed -username \"username\" -password \"anencryptedpassword\"\r\n\r\nThis adds the feed to the global nuget.config, along with key information in the \\<packageSourceCredentials\\> tag.\r\n\r\nWhen that is present, restoring running on CoreCLR fails. This is exposed through the CLI, which means VS with the .NET Core SDK installed will fail to restore .NET Core projects.\r\n\r\nInstead of just failing, on CoreCLR Nuget should ignore feeds which have credentials like this.\r\n\r\nRepro:\r\n1) Get the .NET CLI SDK (RC2 reproduces it, as does latest.)\r\n2) mkdir res\r\n3) Copy the config at the end of the issue into nuget.config in this folder\r\n4) dotnet new\r\n5) dotnet restore --packages here\r\n\r\n--packages is important for the repro as if everything can be satisfied by your cache you won't hit the correct codepath.\r\n\r\nThe config XML below has fake values, but still hits the correct codepath. The top of the stack you should see is also below (you'll first hit a failure because the URL is fake, which can be ignored.)\r\n\r\n```xml\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<configuration>\r\n  <packageSources>\r\n    <add key=\"nuget.org\" value=\"https://api.nuget.org/v3/index.json\" protocolVersion=\"3\" />\r\n    <add key=\"TestFeedForBug\" value=\"https://thiswouldbemyfeed\" />\r\n  </packageSources>\r\n  <packageSourceCredentials>\r\n    <TestFeedForBug>\r\n      <add key=\"Username\" value=\"username\" />\r\n      <add key=\"Password\" value=\"averylongstringofencryptedchars\" />\r\n    </TestFeedForBug>\r\n  </packageSourceCredentials>\r\n</configuration>\r\n```\r\n```\r\n0:010> !clrstack\r\nOS Thread Id: 0xcac (10)\r\n        Child SP               IP Call Site\r\n000000c3005fcd28 00007ffc2d071f28 [HelperMethodFrame: 000000c3005fcd28] \r\n000000c3005fce20 00007ffc144dc38f NuGet.Configuration.EncryptionUtility.DecryptString(System.String)\r\n000000c3005fce50 00007ffc144d4c69 NuGet.Configuration.PackageSourceCredential.get_Password()\r\n000000c3005fceb0 00007ffc13dd0787 NuGet.Protocol.HttpSource+d__33.MoveNext()\r\n000000c3005fcf00 00007ffbb4f6bc7b System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[NuGet.Protocol.HttpSource+d__33, NuGet.Protocol.Core.v3]](d__33 ByRef) [f:\\dd\\ndp\\clr\\src\\mscorlib\\src\\System\\Runtime\\CompilerServices\\AsyncMethodBuilder.cs @ 323]\r\n000000c3005fcf60 00007ffc13dbc9a8 NuGet.Protocol.HttpSource.UpdateHttpClientAsync()\r\n```\r\n\r\n```\r\n0:010> !pe\r\nException object: 000002804ec2d5c8\r\nException type:   System.NotSupportedException\r\nMessage:          Specified method is not supported.\r\nInnerException:   <none>\r\nStackTrace (generated):\r\n<none>\r\nStackTraceString: <none>\r\nHResult: 80131515\r\n```"},"comment":{"url":"https://api.github.com/repos/NuGet/Home/issues/comments/225261464","html_url":"https://github.com/NuGet/Home/issues/2942#issuecomment-225261464","issue_url":"https://api.github.com/repos/NuGet/Home/issues/2942","id":225261464,"user":{"login":"zhili1208","id":7131513,"avatar_url":"https://avatars.githubusercontent.com/u/7131513?v=3","gravatar_id":"","url":"https://api.github.com/users/zhili1208","html_url":"https://github.com/zhili1208","followers_url":"https://api.github.com/users/zhili1208/followers","following_url":"https://api.github.com/users/zhili1208/following{/other_user}","gists_url":"https://api.github.com/users/zhili1208/gists{/gist_id}","starred_url":"https://api.github.com/users/zhili1208/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhili1208/subscriptions","organizations_url":"https://api.github.com/users/zhili1208/orgs","repos_url":"https://api.github.com/users/zhili1208/repos","events_url":"https://api.github.com/users/zhili1208/events{/privacy}","received_events_url":"https://api.github.com/users/zhili1208/received_events","type":"User","site_admin":false},"created_at":"2016-06-10T18:34:52Z","updated_at":"2016-06-10T18:34:52Z","body":"Correct the message and checked into dev and 3.5.0-beta2"}}
{"actor":{"display_login":"zhili1208"}}