git代理
git config --global 代理域名:8080
git config --global 代理域名:8080
git config --global http.sslVerify false
git config --global http.proxy 用户名:密码@代理地址:端口号
git config --global https.proxy 用户名:密码@代理地址:端口号
git config --global http.proxy
取消代理设置
git config --global --unset http.proxy
git config --global --unset https.proxy
python pip
更换内网源
打开appdata文件夹,在资源管理器的地址栏输入%appdata%后回车:即在目录C:\Users\‘用户名’\AppData\Roaming\下
新建一个pip文件夹,在pip文件夹里面新建一个配置文件pip.ini:
在配置文件中输入如下内容后保存即可:
[global]
index-url = http://mirrors.aliyun.com/pypi/simple
trusted-host = mirrors.aliyun.com
再次使用pip,即会使用新源。
三、通过其他源也能下载
python -m pip install --upgrade pip -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com
conda 环境配置
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --set show_channel_urls yes
配置代理(使服务器白嫖自己的网)这里必须配置,只是系统配置了HTTP_PROXY还不行
conda config --set proxy_servers.http http://代理域名:8080
conda config --set proxy_servers.https https://代理域名:8080
检查 ‘C:\Users\r00030104.netrc’ 文件:
proxy_servers:
http: 代理域名:8080
https: 代理域名:8080
内网配置Python pip代理:
STEP1:
1 文件资源管理器直接输入%APPDATA%\pip\,进入pip目录
(或者C:\Users\域账号\AppData\Roaming\pip)
STEP2:
修改pip.ini配置。将以下内容复制替换到pip.ini文件中
[global]
index-url = http://mirrors.aliyun.com/pypi/simple
trusted-host = mirrors.aliyun.com
或者
[global]
index-url = http://mirrors.aliyun.com/pypi/simple
trusted-host = mirrors.aliyun.com
STEP3:
退出后,打开cmd通过pip install安装第三方库
例如:pip install transformers
miniforge 代理:
于Miniforge安装目录(本示例路径为D:\ProgramData\miniforge3)修改文件夹下的.bashrc文件
channels:
- conda-forge
proxy_servers:
http: 代理域名:8080
https: 代理域名:8080
gradle代理
如果有编译失败,是下载错误的,可以 设置gradle的代理:
用户目录/.gradle/gradle.properties
systemProp.http.proxyHost=代理域名
systemProp.http.proxyPort=8080
#systemProp.http.proxyUser=user
#systemProp.http.proxyPassword=password
systemProp.http.nonProxyHosts=
systemProp.https.proxyHost=代理域名
systemProp.https.proxyPort=8080
#systemProp.https.proxyUser=user
#systemProp.https.proxyPassword=password
systemProp.https.nonProxyHosts=