|
|
Introduction
If you are behind a HTTP/HTTPS proxy then this document is for you, it outlines the environment variables you need to set to make gdoc-cp work with proxies.
For consistency, all GDataCopier components use the same proxy variables as the GData API.
If you are behind a proxy please use GDataCopier 1.0.2
Proxy and environment variables
The proxy handler implemented in GDataCopier excepts to an https:// address if you set the https_proxy environment variable.
If you set it to a value starting with http:// it tries talk HTTP over an HTTPS connection which doesn't go so good.
GDataCopier queries the environment for the http_proxy variable for its use but the GData API requires you to set the https_proxy variable.
GDataCopier will warn you if one of the environment variables has a faulty value.
Howto
Simply export these variables using your shell before you run GDataCopier
- proxy-username with the proxy username
- proxy-password with the password for the proxy user
- http_proxy with the url of the proxy to be used for http connections
- https_proxy with the url of an HTTPS proxy that should be used, note this should start with https://
DO NOT export the environment variable called https_proxy, this will cease the script to work because of a issue in urllib2.
BASH hyphen issues
If you are a BASH user then you will notice if you try and export a variable you will get the following error
surfboard:~/Work/gdatacopier devraj$ export proxy-username="username" -bash: export: `proxy-username=username': not a valid identifier
Working around BASH
You can use the env command to temporarily set the environment variables while you run GDataCopier.
env proxy-username="username" proxy-password="password" ./gdoc-cp.py -u someone@gmail.com -p password -l
Sign in to add a comment
