Git Product home page Git Product logo

Comments (15)

ferventcoder avatar ferventcoder commented on July 20, 2024

http://blogs.lessthandot.com/index.php/DesktopDev/MSTech/getting-chocolatey-to-work-when

from chocolatey.

ferventcoder avatar ferventcoder commented on July 20, 2024

fixed in 63cf4e0

from chocolatey.

ldsenow avatar ldsenow commented on July 20, 2024

I am having an error while installing one of the packages

A positional parameter cannot be found that accepts argument 'proxy.company.private:8080'

from chocolatey.

ferventcoder avatar ferventcoder commented on July 20, 2024

Which package are you seeing this with? Or is it any package?

from chocolatey.

ldsenow avatar ldsenow commented on July 20, 2024

the chocolatey version is 0.9.8.11 and I was installing nodejs. But not only installing nodejs

from chocolatey.

ferventcoder avatar ferventcoder commented on July 20, 2024

do you guys have a proxy in place?

Someone else reported issues with the proxy code that we took from a patch.

If you go to C:\NuGet\chocolateyInstall\helpers\chocolateyInstaller.psm1

and comment out lines 499-507:

  if (!$webclient.Proxy.IsBypassed($url))
  {
    $cred = get-credential
    $proxyaddress = $webclient.Proxy.GetProxy($url).Authority
    Write-host "Using this proxyserver: " $proxyaddress
    $proxy = New-Object System.Net.WebProxy($proxyaddress)
    $proxy.credentials = $cred.GetNetworkCredential();
    $req.proxy = $proxy
  }

to be

#  if (!$webclient.Proxy.IsBypassed($url))
#  {
#    $cred = get-credential
#    $proxyaddress = $webclient.Proxy.GetProxy($url).Authority
#    Write-host "Using this proxyserver: " $proxyaddress
#    $proxy = New-Object System.Net.WebProxy($proxyaddress)
#    $proxy.credentials = $cred.GetNetworkCredential();
#    $req.proxy = $proxy
#  }

Then tell me what you see.

from chocolatey.

dansward avatar dansward commented on July 20, 2024

Attempting to install not (cinst nodejs)

With those lines commented out I get...

Downloading nodejs (http://nodejs.org/dist/v0.6.0/node.exe) to C:\NuGet\lib\nodejs.0.6.0\tools\node.exe

[ERROR] nodejs did not finish successfully. Boo to the chocolatey gods!

[ERROR] Exception calling "GetResponse" with "0" argument(s): "The remote server returned an error: (407) Proxy Authentication Required."

Without them commented out I get...

Downloading nodejs (http://nodejs.org/dist/v0.6.0/node.exe) to C:\NuGet\lib\nodejs.0.6.0\tools\node.exe

[ERROR] nodejs did not finish successfully. Boo to the chocolatey gods!

[ERROR] A positional parameter cannot be found that accepts argument '10.0.100.2:8080'.

I do have a proxy in place and the argument it is complaining about is it. Without those lines commented it requests my credentials.

from chocolatey.

ferventcoder avatar ferventcoder commented on July 20, 2024

We need better proxy support. :(

from chocolatey.

vermeeca avatar vermeeca commented on July 20, 2024

FWIW, this seemed to work for me:

if (!$webclient.Proxy.IsBypassed($url))
  {
    #$cred = get-credential
    $proxyaddress = $webclient.Proxy.GetProxy($url).Authority
    Write-host "Using this proxyserver: $proxyaddress"
    #$proxy = New-Object System.Net.WebProxy($proxyaddress)
    #$proxy.credentials = $cred.GetNetworkCredential();
    #$req.proxy = $proxy
    $req.proxy.credentials = [System.Net.CredentialCache]::DefaultCredentials;
  }

from chocolatey.

ferventcoder avatar ferventcoder commented on July 20, 2024

Fixing this again for the first time, for the last time? ;)

from chocolatey.

ferventcoder avatar ferventcoder commented on July 20, 2024

Hopefully this is fixed with the latest bits coming in 0.9.8.17. If not we will add a config value to specify your proxy type.

from chocolatey.

yoshimov avatar yoshimov commented on July 20, 2024

Almost all packages are not working inside of our auth proxy with Chocolatey 0.9.8.20
The Chocolatey commands (clist, cver, etc.) are still working correctly, and it is working to retry the request with new credential when the proxy returns 407 status code.
Here is my modification.
yoshimov@60705c3

from chocolatey.

grenade avatar grenade commented on July 20, 2024

Working with Chocolatey v0.9.8.23, cinst was not working from behind an ISA proxy using NTLM until C:\Chocolatey\chocolateyinstall\helpers\functions\Get-WebFile.ps1 was modified like so:

  #if (!$webclient.Proxy.IsBypassed($url))
  #{
  #  $creds = [net.CredentialCache]::DefaultCredentials
  #  if ($creds -eq $null) {
  #    Write-Debug "Default credentials were null. Attempting backup method"
  #    $cred = get-credential
  #    $creds = $cred.GetNetworkCredential();
  #  }
  #  $proxyaddress = $webclient.Proxy.GetProxy($url).Authority
  #  Write-host "Using this proxyserver: $proxyaddress"
  #  $proxy = New-Object System.Net.WebProxy($proxyaddress)
  #  $proxy.credentials = $creds
  # $req.proxy = $proxy
  #}
  if (!$webclient.Proxy.IsBypassed($url))
  {
    $proxyaddress = $webclient.Proxy.GetProxy($url).Authority
    Write-host "Using this proxyserver: $proxyaddress"
    $req.proxy.credentials = [net.CredentialCache]::DefaultCredentials
  }

from chocolatey.

ferventcoder avatar ferventcoder commented on July 20, 2024

I'm thinking we'll want to do some configuration file stuff for proxies since there seems to be different ways of handling the way in

from chocolatey.

ferventcoder avatar ferventcoder commented on July 20, 2024

@grenade would you file a new issue?

from chocolatey.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.