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:

[global]
extra-index-url =
    https://__token__:<CI_JOB_TOKEN_SUBBED_IN_EXTERNALLY>@<GITLAB_URL>/api/v4/projects/<PROJECT_ID>/packages/pypi/simple

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