heroku / heroku-repo

Plugin for heroku CLI that can manipulate the repo
MIT License
682 stars 111 forks source link

curl: (22) The requested URL returned error: 404 Not Found after running heroku repo:gc -a yogatf #96

Open Soumi7 opened 4 years ago

Soumi7 commented 4 years ago

After cloning the app and downloading it I ran this command:

heroku repo:gc -a yogatf

This is the error it generated:

Running set -e
mkdir -p tmp/repo_tmp/unpack
cd tmp/repo_tmp
curl -fo repo.tgz 'https://s3-external-1.amazonaws.com/heroku_repos/heroku.com/172344453.tgz?AWSAccessKeyId=AKIAIO4SD3DCRO7W6IJQ&Signature=rCY7fi%2FPxX45uRx1V8l66greX3Y%3D&Expires=1590412319'
cd unpack
tar -zxf ../repo.tgz
git gc --aggressive
tar -zcf ../repack.tgz .
curl -fo /dev/null --upload-file ../repack.tgz 'https://s3-external-1.amazonaws.com/heroku_repos/heroku.com/172344453.tgz?AWSAccessKeyId=AKIAIO4SD3DCRO7W6IJQ&Signature=n5lA8CiHaEILsuhkF42ysrII7nE%3D&Expires=1590412320'
exit on ⬢ yogatf... up, run.2720 (Free)
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404 Not Found

I was tring to purge cache but before that the gc command fails.

Here is the ss: l

rakesh835 commented 4 years ago

facing same issue, anyone have solution please reply asap

bharath-acchu commented 3 years ago

I'm facing the same issue. Please help!!!

davidkohr commented 3 years ago

I was just able to do a clone a few minutes ago for my prod instance and even pushed with it. Now I can't even clone neither the test or prod app.

thinq4yourself commented 3 years ago

+1

edmorley commented 3 years ago

Hi! If you get this error it means your app doesn't have a Git repo, since the repo was not found (404). This can happen if using GitHub sync or other non-git push heroku main type deployment methods, since they don't go via the Heroku Git server. It will also be the case if you've previously run heroku git:reset (which deletes the Git repo) and not pushed again since.

The good news is that if the repo doesn't exist, there is no need to GC it, so you can ignore the error. The repo:gc command should definitely handle this case more gracefully (eg exit with a "repo doesn't exist" error message instead), but the end result for performing the action would be the same.

If you're running the GC command to try and reduce slug size, GCing the repo doesn't help - use these docs instead: https://devcenter.heroku.com/articles/slug-compiler#slug-size https://help.heroku.com/KUFMEES1/my-slug-size-is-too-large-how-can-i-make-it-smaller