Getting 403 forbidden from TestPypi #38
-
Hello i've setup the github action for uploading to the TestPypi index but it keep getting 403 forbidden this is my yaml file content: - name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_TEST_TOKEN }}
repository_url: https://test.pypi.org/legacy/
this is the runner log: Uploading distributions to https://upload.pypi.org/legacy/
Uploading sphinx_uedoc_theme-0.1.dev1+gb6996e3-py3-none-any.whl
0%| | 0.00/5.76k [00:00<?, ?B/s]
100%|██████████| 5.76k/5.76k [00:00<00:00, 50.2kB/s]
NOTE: Try --verbose to see response content.
HTTPError: 403 Forbidden from https://upload.pypi.org/legacy/
Invalid or non-existent authentication information. See https://pypi.org/help/#invalid-auth for more information. and i checked that the token was not empty Run echo ${#TEST_GITHUB_TOKEN}
echo ${#TEST_GITHUB_TOKEN}
shell: /bin/bash -e {0}
env:
pythonLocation: /opt/hostedtoolcache/Python/3.8.5/x64
TEST_GITHUB_TOKEN: *** |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
This has a local version part. PyPI (and TestPyPI for that matter) are incompatible with it. You should probably set |
Beta Was this translation helpful? Give feedback.
-
just tested with "no-local-version" but still got 403
which result in a file name like sphinx_uedoc_theme-0.1.dev781597224571-py3-none-any (it upload fine with twine)
|
Beta Was this translation helpful? Give feedback.
-
Also, since this is 403, make sure that (1) your secret name is correct, (2) you didn't accidentally copy extra trailing spaces that would break the value. I think the easiest way to fix this is to just edit the token and when pasting, check if it looks okay... |
Beta Was this translation helpful? Give feedback.
-
Is your workflow public? I could take a look if it is... Does it emit any warnings on the workflow page? FWIW this action runs |
Beta Was this translation helpful? Give feedback.
-
i feel stupid i checked 3 times for trailing spaces but there was one
before was 180 |
Beta Was this translation helpful? Give feedback.
Also, since this is 403, make sure that (1) your secret name is correct, (2) you didn't accidentally copy extra trailing spaces that would break the value.
I think the easiest way to fix this is to just edit the token and when pasting, check if it looks okay...