Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to cgi escape ruby credentials

Tags:

ruby

I am running the command bundle install and keep getting the following error

Please CGI escape your usernames and passwords before setting them for authentication.

I am unsure how I could go about CGI escaping my credentials- any ideas? Thanks

like image 209
Samantha Avatar asked Jun 27 '26 14:06

Samantha


1 Answers

You can do this in irb with Ruby's CGI::Util module:

$ irb
irb(main):001:0> require "cgi"
=> true
irb(main):002:0> CGI.escape "[email protected]"
=> "foo%40example.com"

like image 144
Simon Avatar answered Jun 30 '26 05:06

Simon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!