-
Notifications
You must be signed in to change notification settings - Fork 903
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
Secure Sources Not Working #240
Comments
This is the only output in the log for this issue: 2015-04-10 15:32:18,004 [INFO ] - ===================================================== Debug='True'|Verbose='True'|Force='True'|Noop='False'| Information.Is64Bit='True'|Information.IsInteractive='True'| |
I think this is also a known issue - duplicate of #201 |
Actually, let's call this the issue filed for #201. |
Apologies here, it does seem like you guys may need to take advantage of a support contract so that urgent issues like this will be met with urgent priority. Would you say that is a correct assumption? |
I was a kickstarter backer at the $35 level which got me: "1 annual pro license at the same time as the general population". Does that have any influence on bug priority? |
The Read-Host issue is more urgent for me than this one, though, since this one has an insecure work-around. |
Definitely helps! This is something we want to address in the next version - 0.9.9.5 which should be out as soon as we get a few more fixes in. |
Agreed. Read-Host seems pretty high priority. |
Just some extra info on the case here. |
The issue here is that the source never passes the sources with the security information. I am working on this now. |
When can we expect a new release of chocolatey with these fixes? |
Add the machine sources to the configuration. This will be used when determining credentials to access a source.
Allow passing credentials at runtime to certain commands.
When loading up configuration, be sure to set the machine wide sources into the configuration value for machine sources. This way they can be used later.
When NuGet needs credentials for a source, it was using a default credential provider that needs to use the same format as the NuGet config file. This provides a way to pull those credentials from the Chocolatey stored sources, use the passed in credentials, or prompt for credentials if the user is interactive.
NuGet has an HttpClient that exposes a CredentialProvider. Set that to the ChocolateyNugetCredentialProvider so it is used by NuGet when determining credentials.
In the next few hours. Hopefully sooner. |
Awesome :D On Tue, Apr 21, 2015 at 9:18 AM Rob Reynolds notifications@github.com
|
* stable: (22 commits) (GH-121) Making Uninstall-ChocolateyZipPackage more robust when deleting files that were copied during installation of the Zip package (doc) update changelog/nuspec (GH-238) ApiKey source matching intuitive (maint) formatting (GH-240) Set CredentialProvider for NuGet (GH-240) ChocolateyNugetCredentialProvider (GH-240) Add default sources to machine sources (maint) Only warn subcommand list if not empty (GH-171) Use RedirectedHttpClient (GH-240) pass credentials at runtime (GH-240)(config) Add machine sources (doc) how to quote values (GH-230) Export all functions and aliases imported (GH-230) Fix Issues with Generate/Remove BinFile (GH-185) Remove console prompt default choices (GH-186) Uninstall - no prompt for one version (GH-182) Ask before printing ps1 scripts (GH-187) Show log file path in messages. (maint) formatting (GH-169) Do not resolve disabled sources ... Conflicts: src/chocolatey/infrastructure.app/commands/ChocolateySourceCommand.cs src/chocolatey/infrastructure.app/runners/GenericRunner.cs
a moment ago, I install 0.9.9.8 to see if this issue was now fixed, but I still get "0 packages found". |
@The1nternet What arguments did you pass? |
choco list -s=mysourcename |
So my first question - have you added the source to your default sources with the correct credentials? Second if not - you should pass username and password to the prior arg. |
at the top of this issue, i detailed all the arguments I passed when setting up the source. That's still how I am setting it up. i.e. choco source add -n mysource -s https://www.myget.org/F/myfeed/api/v2 -u UserName -p password |
And you are querying that source exactly with trailing slashes? |
You cannot use the source name. Sorry just noticed that |
Sourceurl is all that works currently |
Because we don't yet resolve sources by name |
Hi, I am still seeing a similar issue when trying to poll my Artifactory nuget repo. I currently have it mirroring the public Chocolatey feed. Artifactory requires username/password for auth. If I run If I run [NuGet] Exception has been thrown by the target of an invocation. Chocolatey installed 0/1 packages. 1 packages failed. Failures
|
Additionally, if I do not specify |
@eschu21 howdy. If choco search works, but install does not, I don't think it is a problem with hitting the secure source. To really understand what may be going on, the chocolatey.log is going to have very detailed information. Ensure you are on the latest version of Chocolatey (v0.10.7), and run those commands with |
Also, make sure you are not on an older version that is subject to #1248 |
See the gist here: https://gist.github.com/eschu21/3f192578f1bf7aa57da51cbc29ee9ea6 Attempt to install lines 0-112. The rest is a search that works. I am running latest version (v0.10.7). Another quirk, I was able to pull packages earlier today when prompted for creds, but now it is failing both with prompt and with supplying them when adding the source. The search still works. Thanks much in advance! |
Looks like it is something in NuGet.Core throwing an exception - https://gist.github.com/eschu21/3f192578f1bf7aa57da51cbc29ee9ea6#file-output-log-L93. @eschu21 can you file a new issue with this information? Thanks! |
Interesting. I will file an issue, but I want to note that if I use |
@eschu21 Chocolatey uses NuGet.Core v2.11 modified. There could have been a fix or incompatibility introduced in Artifactory that prevents choco from working in some way or there is something where the credentials are having issues. There could also be other things preventing this from working properly. I will say there are many folks successfully doing exactly what you are doing, so it's likely something in configuration or environment. |
@ferventcoder I think I just found my issue. I am pointing to a virtual repo that contains a reference to our public chocolatey repo cache. This is when it fails. If I point directly to the cache repo, I get challenged for credentials and the package pulls. I will see what I can dig up on how to manage this setup. Thanks for taking the time to take a look with me! |
We have a private feed hosted on MyGet, and it no longer works after updating to Chocolatey 9.9.4. Our feed requires a username and password. I am setting up the feed like this:
choco source add -n mysource -s https://www.myget.org/F/myfeed/api/v2 -u UserName -p password
After setting up this feed, if I then do a search for any packages in this feed, it returns 0 results (i've tried it with and without quotes around the source url). I have tried installing packages by name, and I get an error that the package wasn't found on my feed. Here is the search command I run that returns "0 packages found":
choco search -s mysource
Before the new update, the way I setup this source before the chocolatey update was like this:
.\NuGet.exe sources add -name "mysource" -source "https://www.myget.org/F/myfeed/"
.\NuGet.exe sources update -Name "mysource" -UserName "MyUserName" -Password "mypassword"
this way worked perfectly with no issues. This is a very serious issue as we depend on chocolatey for the distribution of our software to our clients, and we have to have the secure feed from myget, and now all of our packages are unreachable.
*note: I am able to see the packages on my feed if I make the feed public, then pass the full URL of the feed as the "-s" parameter for "choco install". Also, i'm able to see the packages if I keep the feed private, then pass the full pre-authenticated URL as the "-s" parameter of "choco install". Neither of these options are acceptable however, as they both require using the full url instead of the short source name, the first requires making my feed public, and the second requires passing around my pre-authenticated api-key to everyone who needs to install our software.
URGENT!
The text was updated successfully, but these errors were encountered: