heroku-repo icon indicating copy to clipboard operation
heroku-repo copied to clipboard

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

Open Soumi7 opened this issue 5 years ago • 5 comments

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

Soumi7 avatar May 25 '20 12:05 Soumi7

facing same issue, anyone have solution please reply asap

rakesh835 avatar Jun 27 '20 12:06 rakesh835

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

bharath-acchu avatar Oct 06 '20 03:10 bharath-acchu

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.

davidkohr avatar Oct 23 '20 20:10 davidkohr

+1

thinq4yourself avatar Nov 02 '20 15:11 thinq4yourself

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

edmorley avatar Jan 13 '21 09:01 edmorley