GVKun编程网logo

如何使Anaconda在HTTP代理(不是https)后面工作?(anaconda设置代理)

16

如果您想了解如何使Anaconda在HTTP代理和不是https后面工作?的知识,那么本篇文章将是您的不二之选。我们将深入剖析如何使Anaconda在HTTP代理的各个方面,并为您解答不是https后

如果您想了解如何使Anaconda在HTTP代理不是https后面工作?的知识,那么本篇文章将是您的不二之选。我们将深入剖析如何使Anaconda在HTTP代理的各个方面,并为您解答不是https后面工作?的疑在这篇文章中,我们将为您介绍如何使Anaconda在HTTP代理的相关知识,同时也会详细的解释不是https后面工作?的运用方法,并给出实际的案例分析,希望能帮助到您!

本文目录一览:

如何使Anaconda在HTTP代理(不是https)后面工作?(anaconda设置代理)

如何使Anaconda在HTTP代理(不是https)后面工作?(anaconda设置代理)

我在工作时与Anaconda一起使用代理时遇到了麻烦。

当我有以下环境变量时:

http_proxy: http://domain\username:password@corp.com:8080https_proxy: https://domain\username:password@corp.com:8080

要不就

http_proxy: http://server\username:password@corp.com:8080

设置然后git起作用。但是Anaconda不起作用。我正在尝试跑步

conda update conda

我得到:

Could not connect to https://repo.continuum.io/pkgs....Could not connect to https://repo.continuum.io/pkgs....

Anaconda不能与http一起使用吗?并需要一个https代理?因为我在想我的公司可能没有https代理服务器设置(我只看到他们使用http)。或有时我得到错误:

File "c\Anaconda2\", line 340, in wait    waiter.acquire()KeyboardInterruptCould not connect to https://repo.continuum.io/pkgs....Could not connect to https://repo.continuum.io/pkgs....

我正在使用Windows 7。

答案1

小编典典

您需要在Windows用户区域中创建一个 .condarc 文件:

C:\Users\<username>\

该文件应包含:

channels:- defaults# Show channel URLs when displaying what is going to be downloaded and# in ''conda list''. The default is False.show_channel_urls: Trueallow_other_channels: Trueproxy_servers:    http: http://proxy.yourorg.org:port    https: http://proxy.yourorg.org:portssl_verify: False

android – 强制Gradle使用HTTP而不是HTTPS

android – 强制Gradle使用HTTP而不是HTTPS

我正在尝试构建反应性的 Android应用程序,作为一个依赖,我看到我有毕业,但它无法加载在构建.
错误信息:
* What went wrong:
A problem occurred configuring root project 'MobileApp'.
> Could not resolve all dependencies for configuration ':classpath'.
   > Could not resolve com.android.tools.build:gradle:1.3.1.
     required by:
         :MobileApp:unspecified
      > Could not resolve com.android.tools.build:gradle:1.3.1.
         > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/1.3.1/gradle-1.3.1.pom'.
            > Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/1.3.1/gradle-1.3.1.pom'.
               > Connection to https://jcenter.bintray.com refused

这个问题很清楚,我正坐在公司代理的身后,阻止像这样的HTTPS HTTPS这样的错误.
所以我的问题是:如何强制毕业使用HTTP加载这些文件?这些属性应该放在哪里(哪个毕业文件,即gradle.properties)?

附:我已经在gradle属性文件中设置了这些:

systemProp.http.proxyHost= myHost
systemProp.http.proxyPort= myPort
systemProp.http.proxyUser= myUser
systemProp.http.proxyPassword= myPassword

任何链接,建议等都会有很多帮助.

解决方法

我有同样的问题,并修复它.

毕业生被迫通过https代理获得jcenter的依赖关系.

如果你添加

maven { url "http://jcenter.bintray.com" }

在您的存储库中,而不是jcenter(),gradle将该存储库视为具有http代理的简单maven存储库.

你的项目build.gradle应该如下所示:

buildscript {
    repositories {
        maven { url "http://jcenter.bintray.com" }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.3.1'
    }
}

allprojects {
    repositories {
        maven { url "http://jcenter.bintray.com" }
    }
}

ASP.net检查页面是http还是https

ASP.net检查页面是http还是https

我有一个Web应用程序托管在多个服务器上,其中一些是在https。如果页面当前处于http或https中,如何从代码后面检查?

解决方法

您可以参考HttpRequest类上的Request.IsSecureConnection属性。要在页面,用户控件等之外的完整引用,请使用HttpContext.Current.Request.IsSecureConnection。

Delphi w Indy 10:idHTTPRequest POST总是HTTP 1.0,如何使它成为HTTP 1.1?

Delphi w Indy 10:idHTTPRequest POST总是HTTP 1.0,如何使它成为HTTP 1.1?

我们正在向Web服务发出POST请求.

工作良好.

但是,我们注意到请求始终是HTTP 1.0,这导致我们的Web服务器拒绝gzip响应.

如果请求是HTTP 1.1,则响应被gzip压缩.

我们如何正确地要求Indy 10发出HTTP 1.1 POST请求?

谢谢!

解决方法

将hoKeepOrigProtocol选项包含在HTTPOptions属性集中(将其设置为True).除了将ProtocolVersion属性设置为pv1_1(这是默认值).

在TIdCustomHTTP.Post方法代码中,有一条解释当前行为的注释:

Currently when issuing a POST,IdHTTP will automatically set the
protocol to version 1.0 independently of the value it had initially.

This is because there are some servers that don’t respect the RFC to
the full extent. In particular,they don’t respect sending/not sending
the Expect: 100-Continue header. Until we find an optimum solution
that does NOT break the RFC,we will restrict POSTS to version 1.0.

以下几行是对版本1.0的更改,其中包含以下注释:

// If hoKeepOrigProtocol is SET,it is possible to assume that the developer
// is sure in operations of the server
if not (hoKeepOrigProtocol in FOptions) then begin
  if Connected then begin
    disconnect;
  end;
  FProtocolVersion := pv1_0;
end;

如果您在HTTPOptions中包含hoKeepOrigProtocol选项,则会跳过上面的代码(版本不会更改).

Django的HttpResponseRedirect是http而不是https

Django的HttpResponseRedirect是http而不是https

我的服务器运行Django + Gunicorn + Nginx。

我已经添加了SSL证书并configuration了Nginx以将httpredirect到https。 当收到https请求时,Nginx将它作为http传递给Gunicorn。

我的程序有时会返回HttpResponseRedirect ,并且浏览器得到一个redirect响应,并重新请求http,所以Nginxredirect到https。

我怎样才能避免这一点? 如何configuration服务器,使第一个redirect直接指向https URL?

在Djangopipe理中上传文件时出现UnicodeEncodeError

http 403错误+“readv()失败(104:连接重置由同级)而读取上游”

img HTML标记不尊重HTTP刷新标题(但在浏览器中加载图像URL)

如何在Windows Vista上设置django-admin.py?

Nginx / gunicorn Django Rest Framework应用程序的端口代理

与WsgiDaemonProcess的django apacheconfiguration不工作

2个Bitnami Django项目同时运行Apache Wsgi

Django 1.8.4和uWsgiconfiguration有几个进程的语言切换问题

Wsgi中的两个单独的django站点(根和/两个)

Django减less模板渲染时间

在Nginx配置(在location块内),指定这个:

proxy_redirect off; proxy_set_header X-Forwarded-Proto $scheme;

proxy_redirect告诉Nginx,如果后端返回一个HTTP重定向,它应该保持原样。 默认情况下,Nginx假定后端是愚蠢的,并试图变得聪明; 如果后端返回一个“重定向到http:// localhost:8000 / somewhere ”的HTTP重定向,那么Nginx会用类似于http://yourowndomain.com/somewhere的东西来替换它。“但是Django不是愚蠢的可以配置成不是愚蠢的)&#x3002;

Django不知道请求是通过HTTPS还是纯HTTP进行的; Nginx知道,但是它后来对于Django后端的请求总是纯HTTP。 我们告诉Nginx使用X-Forwarded-Proto HTTP头传递这个信息,这样相关的Django功能如request.is_secure()就能正常工作。 您还需要在SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO','https')设置SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO','https') 。

关于如何使Anaconda在HTTP代理不是https后面工作?的介绍已经告一段落,感谢您的耐心阅读,如果想了解更多关于android – 强制Gradle使用HTTP而不是HTTPS、ASP.net检查页面是http还是https、Delphi w Indy 10:idHTTPRequest POST总是HTTP 1.0,如何使它成为HTTP 1.1?、Django的HttpResponseRedirect是http而不是https的相关信息,请在本站寻找。

本文标签: