Using GitHub with read/write access, on Debian / Ubuntu, behind a NTLM proxy
This gist is accessible using:
- this short URL: https://frama.link/github_ntlm
- this QR code: qrcode
Accessing the Internet, on Linux, behind a NTLM proxy
Most tools don't know how to pass a NTLM proxy, but do know how to pass an HTTP proxy.
cntlm to proxify the NTML proxy with a local HTTP proxy (replace $DOMAIN and $USER with the right values):
$ sudo apt install cntlm $ cntlm -H -d $DOMAIN -u $USER $ sudo vi /etc/cntlm.conf
Set domain and username, and paste the output of the
cntlm command above in that file.
:wq $ sudo service cntlm restart
Tunneling the git-over-SSH trafic through the proxy
$ sudo apt install socat $ mkdir -p ~/.ssh $ cat >>| ~/.ssh/config <<EOF Host github User git Hostname github.com Port 22 ProxyCommand socat - PROXY:localhost:%h:%p,proxyport=3128 EOF
That's it, you're ready to clone GitHub repositories with read / write access.
$ git clone github:REGOVAR/Regovar.git
github where you used to have
firstname.lastname@example.org, so that it takes your
~/.ssh/config file into account.