Install Ceedling under NTLM proxy

Written on August 1, 2019; 1 minutes to read

Ceedling is the build system for C based projects. Ceedling combines CMock, Unity, and CException in one open source package for producing quality C code. The first step to use Ceedling is to install it.

Problem description

Ceedling documentation lists following command for installation (after installing Ruby): gem install ceedling

After a lot of trial, looks like RubyGems is not able to pick up proxy on mine corporate Win7 machine.

407 Proxy Authorization Required

What have been tested:

gem install ceedling -p http://USERNAME:PASSWORD@PROXY_URL:PROXY_PORT
gem install ceedling --http-proxy=http://USERNAME:PASSWORD@PROXY_URL:PROXY_PORT

All the commands above give:

407 "Proxy Authorization Required"

Setting environment variables via command line,

set HTTP_PROXY=PROXY_URL
set HTTP_NAME=USERNAME
set HTTP_PASSWORD=PASSWORD

results in the same error.

Solution

Fast and simple solution is to use local proxy, e.g. Fiddler. it does not require configuration and works out of the box.:

  1. Install and run Fiddler.
  2. Run RubyGems:
    $ gem install --http-proxy http://localhost:8888 GEM_NAME_
    

RubyGems does not work behind NTLM proxy used in many companies. Currently there is no elegant way to bypass it natively, without using local proxies.