Why am I getting a 403 error when installing Shopify CLI on Ubuntu?

I am trying to install Shopify CLI to Linux Ubuntu 18.06
Following command “gem install shopify-cli 403 forbidden” leads to:
ERROR: While executing gem … (Gem::RemoteFetcher::FetchError)
bad response Forbidden 403 (http://api.rubygems.org/quick/Marshal.4.8/nokogiri-1.13.1-x64-unknown.gemspec.rz)

Spent hours to find out the solution…

gem install shopify-cli

not gem install shopify-cli 403 forbidden

Same problem here, Ubuntu 20.04. Located in Russia.

Same problem here. Any updates?

Same issue for me when installing on Ubuntu 20.04


$ sudo apt install ~/Downloads/shopify-cli-2.1.0.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'shopify-cli' instead of '/home/val/Downloads/shopify-cli-2.1.0.deb'
The following packages were automatically installed and are no longer required:
libfwup1 linux-hwe-5.4-headers-5.4.0-42 linux-hwe-5.4-headers-5.4.0-45
linux-hwe-5.4-headers-5.4.0-47 linux-hwe-5.4-headers-5.4.0-48
linux-hwe-5.4-headers-5.4.0-51 linux-hwe-5.4-headers-5.4.0-52
linux-hwe-5.4-headers-5.4.0-53 linux-hwe-5.4-headers-5.4.0-56
linux-hwe-5.4-headers-5.4.0-58 linux-hwe-5.4-headers-5.4.0-59
linux-hwe-5.4-headers-5.4.0-60 linux-hwe-5.4-headers-5.4.0-62
linux-hwe-5.4-headers-5.4.0-65 linux-hwe-5.4-headers-5.4.0-66
linux-hwe-5.4-headers-5.4.0-67 linux-hwe-5.4-headers-5.4.0-70
linux-hwe-5.4-headers-5.4.0-71 linux-hwe-5.4-headers-5.4.0-72
linux-hwe-5.4-headers-5.4.0-73 linux-hwe-5.4-headers-5.4.0-74
linux-hwe-5.4-headers-5.4.0-77 linux-hwe-5.4-headers-5.4.0-80
linux-hwe-5.4-headers-5.4.0-81 linux-hwe-5.4-headers-5.4.0-84
linux-hwe-5.4-headers-5.4.0-86 linux-hwe-5.4-headers-5.4.0-87
linux-hwe-5.4-headers-5.4.0-89 linux-hwe-5.4-headers-5.4.0-90
linux-hwe-5.4-headers-5.4.0-91
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
shopify-cli
0 upgraded, 1 newly installed, 0 to remove and 74 not upgraded.
Need to get 0 B/956 B of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 /home/val/Downloads/shopify-cli-2.1.0.deb shopify-cli all 2.1.0 [956 B]
(Reading database ... 875047 files and directories currently installed.)
Preparing to unpack .../shopify-cli-2.1.0.deb ...
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
bad response Forbidden 403 ([https://api.rubygems.org/quick/Marshal.4.8/nokogiri-1.13.1-x64-unknown.gemspec.rz](https://api.rubygems.org/quick/Marshal.4.8/nokogiri-1.13.1-x64-unknown.gemspec.rz))
dpkg: error processing archive /home/val/Downloads/shopify-cli-2.1.0.deb (--unpack):
new shopify-cli package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
/home/val/Downloads/shopify-cli-2.1.0.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Seems to affect all 2.x versions of shopify-cli. I managed to install v1.14.0 successfully.

I was having this issue with the apt install method.

Not sure exactly what was happening, could have been a firewall issue judging by some other threads out there. It ended up working when I used a specific version and ran the install through ruby gems with

gem install shopify-cli -v 2.16.1

Current versions of the gem at All versions of shopify-cli | RubyGems.org | your community gem host, this was on a Ubuntu 18.04 virtual machine

Hi there,

I am also facing the same issue when trying to install shopify-cli on my linux environment hosted on digitalocean.

Please help me.