upload-artifact fails because the artifact storage quota is full
Create Artifact Container failed: Artifact storage quota has been hit. Unable to upload any new artifactsShort answer
Uploads fail when your account's shared artifact storage is used up. Delete old artifacts or workflow runs, set a short retention-days on new uploads, and upload less data. GitHub recalculates storage only every 6 to 12 hours, so the error can continue for hours after you free space.
Fix it fast
1Find out which cause you have
See which artifacts exist and how large they are, so you know what to delete.
gh api repos/OWNER/REPO/actions/artifacts --jq '.artifacts[] | [.id, .name, .size_in_bytes, .expires_at] | @tsv'2Match what you see, then jump to its fix
- 1
The quota error comes after many runs that all upload artifactsOld artifacts are still storedFix - 2
Every run uploads a large build output or log bundleRetention is longer than you need, and the files are bigFix - 3
You already deleted artifacts and the error persists, or it returns within daysThe plan allowance is smaller than your usageFix
- 1
What does the error look like?
Create Artifact Container failed: Artifact storage quota has been hit. Unable to upload any new artifacts
Cause 1 of 3
Old artifacts are still stored
1Check
By default artifacts are kept for 90 days. Count what is stored in the repository, then look at the Artifacts section of old runs.
gh api repos/OWNER/REPO/actions/artifacts --jq '.total_count'2Fix
Delete artifacts you no longer need (from the run page, the trash icon next to the artifact) or delete old workflow runs, which removes their artifacts too. Deleted artifacts cannot be restored.
# delete one artifact by id
gh api -X DELETE repos/OWNER/REPO/actions/artifacts/ARTIFACT_ID3Verify
The artifact list is shorter. Then wait for the usage figure to refresh before the next upload.
gh api repos/OWNER/REPO/actions/artifacts --jq '.total_count'Confirmed by docs.github.com
Cause 2 of 3
Retention is longer than you need, and the files are big
1Check
Look at the upload step. Without retention-days the repository default applies (90 days unless changed). A value for a single artifact must be between 1 and 90.
grep -n -B3 -A6 'upload-artifact' .github/workflows/*.yml2Fix
Set a short retention for throwaway artifacts and use compression-level 0 for files that do not compress, which the README says makes uploads much faster.
- uses: actions/upload-artifact@v4
with:
name: build-output
path: dist/
retention-days: 33Verify
The artifact on the next run shows an expiry date three days out.
gh api repos/OWNER/REPO/actions/artifacts --jq '.artifacts[0].expires_at'Confirmed by github.com
Cause 3 of 3
The plan allowance is smaller than your usage
1Check
Artifact storage is a pooled allowance shared with GitHub Packages: 500 MB on Free, 1 GB on Pro, 2 GB on Team. Storage accrues hourly, and deleting artifacts lowers current storage but not the usage already accrued this cycle.
gh api repos/OWNER/REPO/actions/artifacts --jq '[.artifacts[].size_in_bytes] | add'2Fix
Upload only what a later job or a human needs, keep retention short, or raise the allowance through your plan or billing settings.
- uses: actions/upload-artifact@v4
with:
name: test-report
path: reports/*.xml
retention-days: 73Verify
Wait 6 to 12 hours for GitHub to update usage, then re-run the failed job.
gh run rerun --failedConfirmed by docs.github.com
How do I stop it coming back?
- Set retention-days on every upload-artifact step.
- Upload artifacts only when a later job or a person needs them.
- Do not upload node_modules or whole build caches; use the cache action for those.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Related fixes
Servers
Docker push to Artifact Registry fails from GitHub Actions with a permission error
Permission 'artifactregistry.repositories.uploadArtifacts' denied on resource
The identity your workflow authenticates as lacks the permission artifactregistry.repositories.uploadArtifacts on the target repository.
4 causes, each with a fixServers
docker pull or push to ghcr.io fails with 'denied'
Error response from daemon: denied
ghcr.io refuses a pull or push when Docker is not logged in, when the token lacks the package scope, or when the workflow's GITHUB_TOKEN has no packages permission or no access to that package.
4 causes, each with a fixServers
git says it could not read Username for https://github.com in a build or CI job
fatal: could not read Username for 'https://github.com': No such device or address
Git asked for HTTPS credentials and there was no terminal to ask on, so it gave up.
3 causes, each with a fixServers
configure-aws-credentials says no OpenID Connect provider exists for GitHub
No OpenIDConnect provider found in your account for https://token.actions.githubusercontent.com
AWS has no IAM identity provider for GitHub's token issuer in the account that holds the role.
3 causes, each with a fixServers
A local composite action in GitHub Actions cannot be found
The action folder is in the repository but the runner reports that its action.yml cannot be found
A local action is read from the checked-out repository.
3 causes, each with a fixServers
actions/configure-pages fails with 'Get Pages site failed'
Create Pages site failed
configure-pages asks GitHub for the repository's Pages site.
3 causes, each with a fix