I use this command on my ubuntu server:  git clone 
git://git.yoctoproject.org/poky
But it failed.

Then I set the proxy for git as this steps:
Git Setup (with nc)

First make sure you have the netcat utility (nc) installed on your host. 

Create a script named *git-proxy* and put it in /usr/local/bin: 

#!/bin/bash

PROXY=10.232.164.161
PORT=9515

case $1 in
       # list internal git servers here that you do not want to use
       # the proxy with, separated by a pipe character '|' as below:
internalgit1.example.com|internalgit2.example.com)
        METHOD="-X connect"
        ;;
*)
        METHOD="-X 5 -x ${PROXY}:${PORT}"
        ;;
esac

/usr/bin/nc $METHOD $*

Note that on some Linux distros, the nc binary is in /bin. You can also 
change the '5' in the second METHOD line to '4' if your proxy server only 
supports SOCKS v4. 

Then set the environment variable GIT_PROXY_COMMAND in your ~/.bashrc file 
and point it to this script: 

export GIT_PROXY_COMMAND=/usr/local/bin/git-proxy


Here is the website I referred to:
https://wiki.yoctoproject.org/wiki/Working_Behind_a_Network_Proxy

It still failed. The terminal prints this message:
lihl@sw3-ubuntu1:~/tmp$ git clone git://git.yoctoproject.org/poky
Cloning into 'poky'...
nc: read failed (0/3): Broken pipe
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Could this issue be solved?

Thanks for your time.

--Lee

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to