Close

11th April 2014

Sublime Text Package Control vs Microsoft ISA Server

Getting Package Control for Sublime Text 3 installed when behind a corporate firewall can be a challenge, so much so that I keep forgetting how to do it whenever I get a given a new computer to work on – so time to write this down!

  • Install CNTLM – once installed, open the cntlm.ini file (C:Program Files (x86)Cntlmcntlm.ini).
  • Set your Username to your domain username and your domain to your domain name.
  • Put a # in front of the password line.
  • Fill in the correct IP and Port number for your corporate proxy. (# out the other if there’s only one).
  • Save the ini file.
  • Open a command line and type cntlm -I -M http://test.com
    (note, you may need to cd to the path that cntlm is installed in first)
  • Copy the hash that gets returned into the ini file on the PassNTLMv2 line and remove the # from the beginning of that line, then save the ini file.
  • Run services.msc and find the cntlm service and start it.
  • Add "http_proxy": "localhost:3128" to your Sublime Text User Settings file.
  • Save that file.
  • Copy the installation text from the Package Control Website and paste it into a new file in Sublime Text.
  • Search for urllib.request.ProxyHandler() and in between those brackets add:
    {"http":"http://localhost:3128"}
  • Now, copy all that text and paste it into the Sublime Text console (Ctrl+`) and hit return.
  • You should see package control get installed successfully! (yay) once done, hit Ctrl+Shift+P and type packin and hit return and choose some packages to install!

Phew, all done!

Package Control behind a corporate proxy, if you have any other troublesome apps throwing 407 Authentication errors, then just configure them to point to localhost:3128 and ensure that the cntlm service is running – oh and don’t forget to update the hash in the cntlm config should you ever change your password 🙂

Leave a Reply