remix-run / remix

Build Better Websites. Create modern, resilient user experiences with web fundamentals.
https://remix.run
MIT License
30.13k stars 2.55k forks source link

`create-remix` CLI tool fails 403 when executed on VPN network #7721

Open cliffordfajardo opened 1 year ago

cliffordfajardo commented 1 year ago

What version of Remix are you using?

Latest

Are all your remix dependencies & dev-dependencies using the same version?

Steps to Reproduce

Try to run any of the variations of create-remix when on VPN (ex: you're on the work office WIFI)

npx create-remix@nightly --template pcattori/remix-template-vite npx create-remix@latest --template remix-run/remix/templates/express

Example Reporoduction

  1. ❌ Ran command while connected to VPN / corporate network
  2. ✅ Changed to my phone's hotspot connection (also works at home on my wifi) & it works image

Expected Behavior

create-remix command should work regardless of the network (behind a VPN or not)

Actual Behavior

Fails to install template & get a 403

bluefire2121 commented 1 year ago

A work-around...

  1. npx create-remix@latest with VPN off
  2. when the "select which folder you want to install remix" cli screen appears, turn VPN on
cliffordfajardo commented 1 year ago

Yep, turnning on VPN is the quick fix - thanks

I'll have to try and checkout the copy-template.ts file, the place where this proxy logic and API call to github is made

brophdawg11 commented 1 year ago

I've run into this before but I'm not sure it's something we can "fix"? I have to use the --token flag each time to get past it because I assume GitHub is rate limiting or blocking when enough requests come through the same VPN node or something. Using token with my own PAT seems to get me past the error.

emilpaw commented 7 months ago

Checking if rate limiting is the issue can be done by calling the endpoint manually and looking at the response, e.g. with curl:

curl https://api.github.com/repos/remix-run/remix/releases/latest -v

I also had the issue and described a potential solution in https://github.com/remix-run/remix/discussions/9192.