[poky] build issues when behind a proxy

Laurentiu Palcu laurentiu.palcu at intel.com
Tue Jan 21 01:48:13 PST 2014


On Tue, Jan 21, 2014 at 12:47:21AM -0800, Roseville House wrote:
> When I commented out socat in git-proxy I made some progress but still
> failed on following  URLs
> 
> 
> ERROR: Function failed: Fetcher failure for URL:
> 'git://git.yoctoproject.org/opkg-utils'. Unable to fetch URL from any
> source.
> ERROR: Function failed: Fetcher failure for URL:
> 'git://git.yoctoproject.org/matchbox-keyboard;branch=matchbox-keyboard-0-1'.
> Unable to fetch URL from any source.
> ERROR: Function failed: Fetcher failure for URL:
> 'git://git.yoctoproject.org/yocto-kernel-tools.git'. Unable to fetch
> URL from any source.
> ERROR: Function failed: Fetcher failure for URL:
> 'git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git'. Unable to
> fetch URL from any source.
> WARNING: Failed to fetch URL
> git://git.yoctoproject.org/linux-yocto-3.10.git;bareclone=1;branch=standard/common-pc/base,meta;name=machine,meta,
> attempting MIRRORS if available
Does 'git clone git://git.yoctoproject.org/linux-yocto-3.10.git' work
in terminal?

> 
> On Tue, Jan 21, 2014 at 12:34 AM, Roseville House
> <championoaks at gmail.com> wrote:
> > Thanks a lot for your reply :)
> > I followed the instructions but still stuck
> >
> > user at user:~/yocto/poky/build$ echo $GIT_PROXY_COMMAND
> > /usr/local/bin/git-proxy
> > user at user:~/yocto/poky/build$ cat /usr/local/bin/git-proxy
> > #!/bin/bash
> > PROXY=proxy.company.com
> > PORT=901
> > exec socat STDIO SOCKS4:$proxy:$1:$2
> > case $1 in
> > # list git servers here that you do not want to use
> > # the proxy with, separated by a pipe character '|' as below:
> >
> > review.tizen.org)
> >    METHOD="-X connect"
> >          ;;
> > *)
> >  METHOD="-X 5 -x ${PROXY}:${PORT}"
> >  #The line above is applicable to Ubuntu and openSUSE.
> >  #For Fedora, use the variation below since it only supports socks v4.
> >  #METHOD="-X 4 -x ${PROXY}:${PORT}"
> >          ;;
> >  esac
> >
> >  nc $METHOD $*
> > user at user:~/yocto/poky/build$ cat ~/.gitconfig
> > [http]
> > proxy = http://proxy.company.com:901
> > [core]
> > gitProxy = git-proxy
> >
It looks like you have an interesting combination of socat and nc in the
same proxy script, plus the GIT_PROXY_COMMAND in your environment and
proxy setting in ~/.gitconfig. :) GIT_PROXY_COMMAND normally overrides
these settings.

Also, it looks like the socat solution has a small bug: s/proxy/PROXY

I suggest you try the following:
 * remove the proxy settings in ~/.gitconfig;
 * set the proxy script to the example below (I'm using this one);
 * put GIT_PROXY_COMMAND in your ~/.bashrc

Here is how my proxy script looks, maybe it helps:

******************
#!/bin/sh

case $1 in
        *.company.com|192.168.*|127.0.*|localhost)
                METHOD="-X connect"
                ;;
        *)
                METHOD="-X 5 -x proxy.company.com:8080"
        ;;
esac
/bin/nc $METHOD $*
******************

Laurentiu


More information about the poky mailing list