NuGet restore using Deploy Token returns 403 forbidden

I’m having trouble getting my .NET projects to restore using the Deploy Token. Using a Personal Access Token works. This is when attempting to access GitLab from outside of GitLab.

Reproduce:

  1. Create a deploy token with read permissions (or full read/write, doesn’t matter)
  2. Attempt to restore a project that has a package on the group repository using the token created
  3. Fails with 403 Forbidden

If the password was incorrect, the error is 401 Unauthorized, so this is clearly not a password issue.

Replacing step 1 with a Personal Access Token works fine.

When running this within GitLab CI it works fine as well.