laravel / homestead

MIT License
3.85k stars 1.45k forks source link

Provision of new box fails to fetch and install ngrok #1960

Closed excellentingenuity closed 2 months ago

excellentingenuity commented 3 months ago

Versions

Host operating system

Mac OS Sonoma 14.3.1 on M2 Mac

Homestead.yaml

---
ip: "192.168.56.10"
memory: 2048
cpus: 2
provider: parallels

box: laravel/homestead

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: ~/Dropbox/Projects/LegacyTradeCollege/web
      to: /home/vagrant/Code/LegacyTradeCollege
    - map: ~/Dropbox/Projects/GreyMatter/web
      to: /home/vagrant/Code/GreyMatter
    - map: ~/Dropbox/Projects/test
      to: /home/vagrant/Code/test
    - map: ~/Dropbox/Projects/InEngine/Core
      to: /home/vagrant/Code/InEngine
    - map: ~/Dropbox/Projects/InEngine/Modules
      to: /home/vagrant/Code/Modules
    - map: ~/Dropbox/Projects/GBC/
      to: /home/vagrant/Code/GBC

sites:
    - map: legacytradecollege.app
      to: /home/vagrant/Code/LegacyTradeCollege/public
      php: "8.2"
    - map: greymatter.app
      to: /home/vagrant/Code/GreyMatter/public
      php: "8.2"
    - map: test.app
      to: /home/vagrant/Code/test/public
      php: "8.2"
    - map: inengine.app
      to: /home/vagrant/Code/InEngine/public
      php: "8.2"
    - map: gbc.app
      to: /home/vagrant/Code/GBC/
      php: "8.2"

databases:
    - homestead
    - LTC
    - GreyMatter
    - test
    - InEngine
    - gbc

features:
    - mysql: true
    - mariadb: false
    - postgresql: false
    - ohmyzsh: true
    - webdriver: false

services:
    - enabled:
          - "mysql"

Vagrant destroy & up output

homestead up --provision
Bringing machine 'homestead' up with 'parallels' provider... ==> homestead: Checking if box 'laravel/homestead' version '14.0.2' is up to date... ==> homestead: Forwarding ports... homestead: 80 => 8000 homestead: 443 => 44300 ==> homestead: Resuming suspended VM... ==> homestead: Waiting for machine to boot. This may take a few minutes... homestead: SSH address: 10.211.55.4:22 homestead: SSH username: vagrant homestead: SSH auth method: private key ==> homestead: Machine booted and ready! ==> homestead: Running provisioner: file... homestead: /Users/jamesjohnson/Homestead/aliases => /tmp/bash_aliases ==> homestead: Running provisioner: handle_aliases (shell)... homestead: Running: inline script ==> homestead: Running provisioner: setting authorize key (shell)... homestead: Running: inline script ==> homestead: Running provisioner: setting authorize permissions for id_rsa (shell)... homestead: Running: inline script ==> homestead: Running provisioner: mk_features (shell)... homestead: Running: inline script ==> homestead: Running provisioner: own_features (shell)... homestead: Running: inline script ==> homestead: Running provisioner: apt_update (shell)... homestead: Running: inline script homestead: Hit:1 https://download.docker.com/linux/ubuntu jammy InRelease homestead: Hit:2 https://deb.nodesource.com/node_21.x nodistro InRelease homestead: Err:3 https://ngrok-agent.s3.amazonaws.com buster InRelease homestead: 403 Forbidden [IP: 52.218.246.75 443] homestead: Hit:4 http://ports.ubuntu.com/ubuntu-ports jammy InRelease homestead: Hit:5 http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease homestead: Hit:6 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy InRelease homestead: Hit:7 http://ports.ubuntu.com/ubuntu-ports jammy-backports InRelease homestead: Hit:8 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease homestead: Hit:9 https://apt.postgresql.org/pub/repos/apt jammy-pgdg InRelease homestead: Reading package lists... homestead: E: Failed to fetch https://ngrok-agent.s3.amazonaws.com/dists/buster/InRelease 403 Forbidden [IP: 52.218.246.75 443] homestead: E: The repository 'https://ngrok-agent.s3.amazonaws.com buster InRelease' is no longer signed. The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong.

Expected behavior

Install of ngrok and other necessary components

Actual behavior

Ngrok cannot install because the IP is forbidden and it is no longer signed, probably needs and updated package entry.

Steps to reproduce

  1. Destroy box
  2. git fetch && git pull origin release
  3. homestead up or homestead up --provision
josezenem commented 3 months ago

I was just writing up an issue as well for this, instead I'll post a temporary solution to still get up and running for anyone interested and needs to.

Edit Homestead.yaml, add a new key

in-flight-service: true

and edit

/scripts/in-flight-service.sh

add the contents at the bottom.

REPO_URL="ngrok-agent.s3.amazonaws.com"

# Comment out the repo in /etc/apt/sources.list
echo "Processing /etc/apt/sources.list..."
sudo sed -i "/$REPO_URL/s/^/#/" /etc/apt/sources.list

# Comment out the repo in /etc/apt/sources.list.d/
echo "Processing /etc/apt/sources.list.d/..."
for file in /etc/apt/sources.list.d/*.list; do
    sudo sed -i "/$REPO_URL/s/^/#/" "$file"
done

then run homestead up or homestead up --provision

this will directly attempt to comment out lines containing the specified repository URL in /etc/apt/sources.list and all .list files within /etc/apt/sources.list.d/, this will break ngrok until a permanent and correct fix is applied.

svpernova09 commented 2 months ago

Not seeing this, might already be updated?