How to use secrets in all repositories of a user github account?

Viewed 605

In an "organization" github account, I can set some global secrets PYPI_USERNAME and PYPI_PASSWORD, make them "Available to public repositories", then use them in my ci.yml like this:

twine upload dist/$PROJECT_NAME-$VERSION.tar.gz -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} --non-interactive  --skip-existing --disable-progress-bar

But in my "user" github account, I can't find any such organization-wide secrets, so I find myself having to enter my secrets for every individual repository, which is a crime against humanity('s time).

1 Answers

The official Github documentation for Managing encrypted secrets for your repository and organization states that:

Secrets are encrypted environment variables that you create in an organization or repository.

Organization-level secrets let you share secrets between multiple repositories, which reduces the need to create duplicate secrets. You can use access policies to control which repositories can use organization secrets.

Therefore, at the moment, only Organization-level secrets let you share secrets between multiple repositories. You will have to create duplicated secrets on your "user account" repositories.

Note that you can also create your own organization, if that makes sense, to resolve your issue.

Related