inohilog

/var/log/inohiro.log

git pull/push to github.com in proxy environment

  • git pull/push to github.com in proxy environment
  • install connect-proxy (connect command)
    • "$ sudo aptitude install connect-proxy"
  • write settings in ~/.ssh/config
    • use 'ssh.github.com:443' if proxy server denies connecting to 22 port (squid (proxy server) denies in default setting)
Host github.com
  User git
  Port 443                  # <= usually I use '22'
  Hostname ssh.github.com   # <= usually I use 'github.com'
  IdentityFile /home/inohiro/.ssh/github/id_rsa
  TCPKeepAlive yes
  IdentitiesOnly yes
  ProxyCommand /usr/bin/connect-proxy -H proxy.hoge.fuga.com:3128 %h %p
  • check whether it works correctly

$ ssh -T git@github.com
Hi inohiro! You've successfully authenticated, but GitHub does not provide shell access.

postscript

$ git config --global http.proxy "http://hoge.fuga.com:3128"