ubuntu - How to configure git to clone repo from github behind a proxy server -


all, encountered problem git on github on ubuntu. have configured proxy setting git config --global http.proxy proxyserver:port when type git clone git@github.com:myusername/example.git , got following error: ssh: connect host github.com port 22: connection timed out fatal: remote end hung unexpectedly should do? steven

i follow steps below access git respositories behind corporate proxy. method works git repositories using git urls "git://something.git"; for git repositories using http urls "http://something.git" use accepted answer link instead.

this version uses corkscrew , sets username , password required proxy.

install corkscrew (ubuntu)

sudo apt-get install corkscrew 

create credentials file containing proxy username , password

echo "username:password" > ~/.corkscrew-auth 

in case credentials

domain\username:password 

secure auth file

chmod 600 ~/.corkscrew-auth 

create corkscrew wrapper script ~/scripts/corkscrew.wrapper

#!/bin/sh exec corkscrew proxy_ip_address proxy_port $* ~/.corkscrew-auth 

make script executable

chmod +x ~/scripts/corkscrew.wrapper 

configure git

git config --global core.gitproxy ~/scripts/corkscrew.wrapper 

test if can clone repository

git init git clone git://some_git_repository_address 

in case want clean git configuration made

git config --global --unset core.gitproxy 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

IIS->Tomcat Redirect: multiple worker with default -