Renovate: GitHub API rejects request against lock file(package-lock.json or yarn.lock) over 1MB with 403

Created on 19 Jun 2018  路  3Comments  路  Source: renovatebot/renovate

What Renovate type are you using?

Renovate CLI

Describe the bug

If a size of lock file exceeds over 1MB, GitHub API rejects a request from renovate with below

DEBUG: GET repos/my-org/my-repo/contents/package-lock.json?ref=master [retries=5] (repository=my-org/my-repo)
 INFO: Retrying request (repository=my-org/my-repo)
       "statusCode": 403,
       "message": "This API returns blobs up to 1 MB in size. The requested blob is too large to fetch via the API, but you can use the Git Data API to request blobs up to 100 MB in size. (403)"

To Reproduce
Steps to reproduce the behavior:

  1. Expand the size of lock file with truncate -s 1m package-lock.json
  2. Run renovate

Expected behavior

It can fetch lock file ordinary even though a large lock file. Perhaps by using Git Data API, as an error message suggesting.

help wanted priority-3-normal bug

Most helpful comment

@kogai thanks for raising the issue. We need to add a try/catch to use the git data when this happens.

All 3 comments

@kogai thanks for raising the issue. We need to add a try/catch to use the git data when this happens.

The solution for this now is to use gitFs. Please ask in config help if you need guidance

Thanks to the solution, those error is not happening anymore for me :tada:
I'm appriciate it :pray:

Was this page helpful?
0 / 5 - 0 ratings