Working Behind a Network Proxy: Difference between revisions

From Yocto Project
Jump to navigationJump to search
(Need socat for our git script)
Line 11: Line 11:


== Git Setup==
== Git Setup==
Ensure you have socat installed, copy <tt>scripts/oe-git-proxy</tt> to a directory included in your PATH and set the following in your configuration:
Ensure you have socat installed, copy <tt>scripts/oe-git-proxy</tt> to a directory included in your PATH and set the following in your configuration:


Line 20: Line 19:


If you wish to use certain hosts without the proxy, specify them in NO_PROXY. See the script for details on syntax.
If you wish to use certain hosts without the proxy, specify them in NO_PROXY. See the script for details on syntax.
== Wget Proxy Configuration ==
Proxy environment variables are not propagated to all stages of the Yocto build process so sometimes wget cannot pick them up. To workaround this add the following to ~/.wgetrc.
https_proxy = http://socks.example.com:1080
http_proxy = http://socks.example.com:1080
ftp_proxy = http://socks.example.com:1080
no_proxy = .example.com:1080;127.0.0.1
use_proxy = on


== Subversion Setup ==
== Subversion Setup ==

Revision as of 23:39, 2 August 2016

This page lists some configuration tips for working behind a proxy.

HTTP/HTTPS/FTP Setup

Set the following environment variables in your ~/.bashrc file. This example uses the same proxy server and port number for all three protocols.

export http_proxy='http://myproxy.example.com:1080/'
export https_proxy='https://myproxy.example.com:1080/'
export ftp_proxy='http://myproxy.example.com:1080/'
export no_proxy='.example.com'

Git Setup

Ensure you have socat installed, copy scripts/oe-git-proxy to a directory included in your PATH and set the following in your configuration:

GIT_PROXY_COMMAND ?= "oe-git-proxy"
# Two possible examples - delete the one that doesn't apply:
ALL_PROXY ?= "socks://socks.example.com:1080"
ALL_PROXY ?= "https://proxy.example.com:8080"

If you wish to use certain hosts without the proxy, specify them in NO_PROXY. See the script for details on syntax.

Wget Proxy Configuration

Proxy environment variables are not propagated to all stages of the Yocto build process so sometimes wget cannot pick them up. To workaround this add the following to ~/.wgetrc.

https_proxy = http://socks.example.com:1080
http_proxy = http://socks.example.com:1080
ftp_proxy = http://socks.example.com:1080
no_proxy = .example.com:1080;127.0.0.1
use_proxy = on

Subversion Setup

You'll need to have the following in your ~/.subversion/servers file:

[global]
http-proxy-exceptions = *.exception.com, www.internal-site.org
http-proxy-host = myproxy.example.com
http-proxy-port = 1080

You can also set http-proxy-username and http-proxy-password if your proxy requires authentication.

CVS Setup (this seems useless since we don't have any recipe requiring cvs now)

For CVS checkouts to work correctly, you need to add some options in your Poky local.conf file.

CVS_PROXY_HOST = "myproxy.example.com"
CVS_PROXY_PORT = "1080"