linux - Using git behind a proxy in python scripts -


i work proxy doesn't git. in of cases, can use export http_proxy , git config --global url."http://".insteadof git://.

but when use yocto's python script, workaround doesn't work anymore. i'm systematically stopped @ getting branches remote repo git://git.yoctoproject.org/linux-yocto-3.14.git.... suspect these lines responsible :

gitcmd = "git ls-remote %s *heads* 2>&1" % (giturl) tmp = subprocess.popen(gitcmd, shell=true, stdout=subprocess.pipe).stdout.read() 

i think after these lines, others try connect git url. script use (yocto-bsp) calls others scripts, call scripts, it's difficult say. have tried add os.system(git config --global url."http://".insteadof git://) before, peanuts.

of course, try , modify url manually (or parsing script) replace git:// http:// manually, solution is... hideous. i'd modification(s) small possible , reproductible easily. of all, i'd working script.

edit : according this page, git url git://git.yoctoproject.org/linux-yocto-3.14 correspondant http url http://git.yoctoproject.org/git/linux-yocto-3.14, can't parse replace git:// http://. not cool.

well, rewriting git url indeed work, when using yp.

however, you're rewriting scheme doesn't work well... you're replacing git:// part or url http://, if @ e.g. linux-yocto-3.14, you'll see repo available through following 2 url's:

git://git.yoctoproject.org/linux-yocto-3.14 http://git.yoctoproject.org/git/linux-yocto-3.14 

that need rewrite git://git.yoctoproject.org http://git.yoctoproject.org/git. thus, you'll need instead:

git config --global url."http://git.yoctoproject.org/git".insteadof git://git.yoctoproject.org 

which means you'll have repeat exercise repositories accessed through git protocol.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -