Skip to content
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

nuget ignores proxy settings when using -ConfigFile (only user-level config file is respected) #747

Open
efcoyote opened this issue Jun 9, 2015 · 5 comments
Labels
Area:Authentication Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Product:dotnet.exe Product:NuGet.exe NuGet.exe Product:VS.Client Status:Excluded from icebox cleanup Status:Inactive Icebox issues not updated for a specific long time Type:Bug
Milestone

Comments

@efcoyote
Copy link

efcoyote commented Jun 9, 2015

If you specify a configuration file when running nuget.exe some settings in this file are ignored. Especially the "http_proxy" setting has no functionality. It only works when specifying the proxy settings in the default config locations (e.g. %APPDATA%\NuGet\NuGet.Config).

Nuget.exe Version: 2.8.60318.667
Windows 7 Enterprise x64

That makes it imposible to declare different proxies for package restoring. We are running Jenkins builds and some packages are stored on a private nuget repository. Additionally neither pac-Files (Proxy-Auto-Config) nor excluded hosts are supported in the default proxy configuration. With Jenkins the browser proxy settings have no effect, so we have to declare them by config file.

See also the related old issue on codeplex: https://nuget.codeplex.com/workitem/4121

@yishaigalatzer yishaigalatzer added this to the 3.1.0-Beta milestone Jun 9, 2015
@yishaigalatzer yishaigalatzer modified the milestones: 3.4, 3.3.0-Beta Nov 24, 2015
@yishaigalatzer yishaigalatzer added Type:Bug Priority:2 Issues for the current backlog. labels Nov 24, 2015
@kamranayub
Copy link

This is an issue on the latest Nuget client as well. Even without -ConfigFile, settings like package sources are used in a Nuget.config residing next to a solution file, but not proxy settings.

@yishaigalatzer yishaigalatzer modified the milestones: 3.5 Beta, 3.4 Beta Feb 25, 2016
@yishaigalatzer yishaigalatzer assigned alpaix and unassigned zhili1208 Mar 8, 2016
@yishaigalatzer yishaigalatzer modified the milestones: 3.4 Beta, 3.5 Beta Mar 8, 2016
@yishaigalatzer yishaigalatzer removed this from the 3.4 Beta milestone Mar 10, 2016
@rrelyea rrelyea added CLI RTM and removed CLI RC2 labels Mar 29, 2016
@rrelyea rrelyea added this to the 3.5 Beta milestone Mar 29, 2016
@yishaigalatzer yishaigalatzer modified the milestones: 3.5 Beta, 3.5 RC Mar 31, 2016
@grillba
Copy link

grillba commented Sep 7, 2016

I'm hitting this issue too.

Is there a known work around to this issue?

Ta

@alpaix
Copy link

alpaix commented Sep 7, 2016

@grillba It can also be set via environment variables http_proxy and no_proxy. http_proxy should be specified in the format http://[username]:[password]@proxy.com whereas no_proxy should be a comma-separated list of domains to bypass the proxy server.

@grillba
Copy link

grillba commented Sep 8, 2016

Thanks. I'd worked out to just set the proxy as part of the msbuild script.

         <Exec Command="nuget.exe config -set http_proxy=http://[username]:[password]@proxy.com" />
         <Exec Command="nuget.exe restore @(SolutionFile)" />

@zarenner
Copy link

zarenner commented Aug 2, 2019

For future readers, looking at the code, it appears that only the user-level config works for proxy settings. This matches the behavior I see, at least on dotnet 2.2.401.

@nkolev92 nkolev92 changed the title nuget.exe ignores proxy settings when using -ConfigFile nuget.exe ignores proxy settings when using -ConfigFile (only global config file is respected) Oct 22, 2019
@nkolev92 nkolev92 changed the title nuget.exe ignores proxy settings when using -ConfigFile (only global config file is respected) nuget.exe ignores proxy settings when using -ConfigFile (only user-level config file is respected) Oct 22, 2019
@nkolev92 nkolev92 changed the title nuget.exe ignores proxy settings when using -ConfigFile (only user-level config file is respected) nuget ignores proxy settings when using -ConfigFile (only user-level config file is respected) Oct 22, 2019
@aortiz-msft aortiz-msft removed the Priority:2 Issues for the current backlog. label Feb 24, 2020
@ghost ghost added the Status:Inactive Icebox issues not updated for a specific long time label Sep 1, 2022
@jeffkl jeffkl added Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. and removed Pipeline:Icebox labels Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:Authentication Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Product:dotnet.exe Product:NuGet.exe NuGet.exe Product:VS.Client Status:Excluded from icebox cleanup Status:Inactive Icebox issues not updated for a specific long time Type:Bug
Projects
None yet
Development

No branches or pull requests