Harbor "project <name> not found" on push in CI
In Harbor the first path segment after the host is the project, and projects are not created on push. If the project does not exist (or your account cannot see it), Harbor returns "project <name> not found". Create the project in Harbor or push under an existing one.
What this error means
docker push to harbor.example.com/team/app fails with "project team not found" or "unauthorized to access repository" referencing the project segment.
unauthorized: project team not found: project team not foundCommon causes
The Harbor project was never created
Harbor requires the project to exist before any push. A new first path segment has no project, so the push fails.
The user cannot see the project
A private project the account is not a member of appears as "not found" rather than forbidden.
How to fix it
Create the project in Harbor first
- Create the project in the Harbor UI or API.
- Add the CI robot/user as a member with push rights.
- Push to harbor.example.com/<project>/<repo>.
curl -u admin:"$HARBOR_PW" -X POST https://harbor.example.com/api/v2.0/projects \
-H 'Content-Type: application/json' \
-d '{"project_name":"team","public":false}'Push under an existing project
Tag the image so the first path segment matches a project that already exists and that your robot can write to.
How to prevent it
- Create Harbor projects ahead of CI pushes.
- Ensure the image path begins with an existing project name.
- Add CI robots as project members with push permission.