2
votes

Running bundle install gave the following

Fetching source index from https://rubygems.org/

Retrying fetcher due to error (2/4): Net::HTTPServerException 403 "Forbidden"

Retrying fetcher due to error (3/4): Net::HTTPServerException 403 "Forbidden"

Retrying fetcher due to error (4/4): Net::HTTPServerException 403 "Forbidden"

Could not fetch specs from https://rubygems.org/

Followed this and changed to http in Gemfile. Problem Still exists. I didn't install any other ruby version. Default on Mac Ruby version : ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18], bundle version 2.0.1.

Running bundle update then gave

Authentication is required for http://rubygems.org/. Please supply credentials for this source. You can do this by running: bundle config http://rubygems.org/ username:password

No idea what the credentials should be, but I signed up at rubygems.org and used that username/password (Pardon if that was silly) and got

Bad username or password for http://[email protected]/. Please double-check your credentials and correct them.

Followed this and turned off IPV6 and still same problem.(If anything the errors showed up a little faster)

Infact now realised none of the gem command works and gives errors like

gem install jekyll bundler

ERROR: While executing gem ... (Net::HTTPServerException) 403 "Forbidden"

While I did install jekyll and bundler yesterday. Today I ran bundle exec jekyll serve and got

Could not find gem 'minima (~> 2.0)' in any of the gem sources listed in your Gemfile. Run bundle install to install missing gems.

Hence, it all started with trying to get Jekyll working. OS : MacOS(10.14.3)

3

3 Answers

1
votes

So I have a proxy in my organization's network which I knew would cause problems so I was infact using a different network. I finally tried to comment out the proxy settings in my .bash_profile, and it was still giving the same errors. I shut down the system and then tried again and it worked.

Such a bummer. Anyway I'm not deleting the question hoping for a better work around than this. I mean if every time I want to use gem I have to do this it's kind of a hassle.

1
votes

Using http instead of https in your Gemfile should do the trick.

Use:

http://rubygems.org

0
votes

Disable IPv6 and HTTPS .

(Windows) -

Open Gem file and replace :

source "https://rubygems.org"

with

source "http://rubygems.org"

then , Go To Control Panel\Network and Internet\Network Connections Right Click on your adapter , and select properties .

Untick IPv6 there