Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using pik.0.3.0..pre.msi and getting Access to the Web Proxy filter is denied #108

Open
InvisibleTech opened this issue Mar 15, 2011 · 5 comments

Comments

@InvisibleTech
Copy link

First, except for my various issues with the corporate proxy (over which I have next to zero control) I am grateful for Pik when I have it working.

NOTE: after running the msi on top of my prior install (my bad) I cannot switch rubies. So I am trying to get back to where I can switch them. After that I really want to see if I can use Pik to install JRuby... but first things first. The issue....

The scenario - use the msi to install Jruby. I am using the msi because another issue here said that was the fix for the "gsub"private method issue using "normal"pre0.3.0 Pik.

D:>pik install jruby
ERROR: You need the 7zip utility to extract this file.
Run 'pik package 7zip install'

D:>pik package 7zip install
INFO: Downloading: http://downloads.sourceforge.net/sevenzip/7za920.zip
to: C:\Documents and Settings\fergjo00.pik\downloads\7za920.zip

There was an error.
Error: Failed to download http://downloads.sourceforge.net/sevenzip/7za920.zip: Proxy Authentication Required ( The ISA
Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )

in: pik/contrib/uri_ext.rb:277:in read' in: net/http.rb:1054:inrequest'
in: net/http.rb:2144:in reading_body' in: net/http.rb:1053:inrequest'
in: net/http.rb:1037:in request' in: net/http.rb:543:instart'
in: net/http.rb:1035:in request' in: pik/contrib/uri_ext.rb:245:inread'
in: pik/contrib/uri_ext.rb:293:in connect' in: pik/contrib/uri_ext.rb:240:inread'
in: pik/contrib/uri_ext.rb:120:in download' in: tempfile.rb:188:inopen'
in: pik/contrib/uri_ext.rb:118:in download' in: pik/contrib/uri_ext.rb:60:indownload'
in: pik/installer.rb:19:in download' in: pik/commands/package_command.rb:56:insevenzip'
in: pik/commands/package_command.rb:14:in `execute'
in: pik_runner:27

D:>

@vertiginous
Copy link
Owner

The downloader code is an extension of open-uri. Open-uri doesn't support password authentication, so I'll have to think on this one a bit.

http://redmine.ruby-lang.org/issues/show/435

As far as not being able to switch rubies, did you run 'pik refresh' after upgrading?

@vertiginous
Copy link
Owner

nevermind, the code is in there. I just needed to read it. I think you need to set an HTTP_PROXY env variable like this:

set HTTP_PROXY=http://user:password@server:port/

Let me know if that works. If not, we'll dig deeper.

@InvisibleTech
Copy link
Author

Thanks for the quick reply, I was able to move back to the previous version
of pik from the gem and after some implode, config action I'm back to status
quo.

Regarding Open uri, I know I got gem working behind the proxy using
http://rubyforge.org/projects/rubysspi/, is this related?

On Tue, Mar 15, 2011 at 5:38 PM, vertiginous <
[email protected]>wrote:

The downloader code is an extension of open-uri. Open-uri doesn't support
password authentication, so I'll have to think on this one a bit.

http://redmine.ruby-lang.org/issues/show/435

As far as not being able to switch rubies, did you run 'pik refresh' after
upgrading?

Reply to this email directly or view it on GitHub:
#108 (comment)

@InvisibleTech
Copy link
Author

Due to our domain (Windows) and password requirements, this format cannot be used - even if I URL encode the \ required to delimit the domain name from user id. Also, we have password constraints requiring use of numbers and special chars. I tried URL encoding, it did not work. Without URL encoding, did not work.

OT: The PIK installer upgrade still not working:

1 uninstall pik 2.x from current ruby
2 install msi for 0.3.0
3 run pik refresh
4 can "see"but cannot us 1.9

Session:

C:\Windows\System32>pik list
=> ruby-1.8.7-p334
ruby-1.9.2-p180

C:\Windows\System32>pik use ruby-1.9.2-p180

C:\Windows\System32>pik list
=> ruby-1.8.7-p334
ruby-1.9.2-p180

C:\Windows\System32>ruby -v
ruby 1.8.7 (2011-02-18 patchlevel 334) [i386-mingw32]

FYI - I used http://rubyinstaller.org/ to install initial 1.8 and needed it for 1.9 due to proxy issues... but in pik 1.2 I was able to switch back and forth.

Thanks

@Kerogi
Copy link

Kerogi commented Jul 4, 2014

I had HTTP_PROXY with proper <user>:<url encoded password>@proxy_host:proxy_port value
I was ok for git, pip ...
But pik for

pik package 7zip install

I got:

Error: Failed to download ...: Proxy Authentification Required

Then I've tried cntlm as proxy in the middle between pik and corporate proxy.
And it worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants