Error pulling packages from self-hosted pypi repository in CI runner

I am using tox to build and test my python packages using self-hosted gitlab. These packages have dependencies for other internally-developed packages that are stored using gitlab pypi. When I run my tox test in CI, I get the following error:

WARNING: 401 Error, Credentials not correct for https://<GITLAB_URL>/api/v4/projects/<PROJECT_ID>/packages/pypi/simple/<PACKAGE_NAME>/
ERROR: Could not find a version that satisfies the requirement <PACKAGE_NAME> (from <OTHER_PACKAGE_NAME>) (from versions: none)
ERROR: No matching distribution found for <PACKAGE_NAME>

I am using a pip.conf file like the following:

extra-index-url =

This works fine on a local machine using my personal api token instead of the CI Job token. What might be causing this problem?