Ich versuche, chocolatey auf einem Windows hinter einem Proxy zu installieren:
@powershell -ExecutionPolicy unrestricted
In Power Shell führe ich
$wc=new-object net.webclient;
$wc.Proxy=new-object system.net.WebProxy('<myproxy-ip>:8012',$true);
$wc.Proxy.Credentials = new-object system.net.NetworkCredential('<myusername>','<mypass>');
iex ($wc.DownloadString('https://chocolatey.org/install.ps1'));
Ich erhalte den folgenden Fehler
Exception calling "DownloadString" with "1" argument(s): "The remote server returned an error: (407) Proxy Authentication Required."
At line:1 char:1
+ iex ($wc.DownloadString('https://chocolatey.org/install.ps1'));
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : WebException
Ich verwende denselben Benutzernamen / dasselbe Passwort, das ich beim Starten von Firefox / IEXPLORER eingeben muss (siehe Abbildung). Es sind keine Standardbenutzernamen / -kennwörter für den Proxy konfiguriert, da ich sie immer eingeben muss.
Weitere Details (Verwenden von Inspect Element in Firefox in einem privaten Fenster)
Antwort-Header
Cache-Control: no-cache
Connection: close
Content-Length: 813
Content-Type: text/html; charset=utf-8
Pragma: no-cache
Proxy-Authenticate: BASIC realm="PROXY_INTERNET"
Proxy-Connection: close
Set-Cookie: BCSI-CS-dfaeac52a135c7c0=2; Path=/
