Replace retired credentials for Bitbucket, npm, and PyPI

Find out which credentials stopped working, what replaces them, and how to check repository access or package publishing before changing a live workflow.

Before you start

  • Choose the target for your check: a private Bitbucket test repository, a disposable npm package, or a TestPyPI project.
  • Ask the repository or package owner to confirm who can edit credentials and run the test job. Keep any existing KeySigner approval in place.

Data and access

Shared or checked
A scoped Bitbucket token or an eligible package publishing job identifies itself to the receiving service. The service checks that identity and its permissions.
Check separately
Repository access, package ownership, workflow approval and remaining legacy credentials all have separate controls.
  1. Find the request the provider rejected

    Identify the job, destination, and action that failed. Check which credential the job references without printing its value. For npm, check whether the action installs dependencies, stages a release, or publishes directly.

    Check. You can name the affected job, account, and destination without exposing a credential.

  2. Choose the supported replacement

    Give the replacement the access needed for the intended operation. For a trusted publisher, check that the package settings match the repository, workflow, and environment used by the job.

    What stopped working and what to use

    Bitbucket Cloud API tokens
    App passwords stopped working for Git over HTTPS and API requests on July 28, 2026. Use a scoped API token. For Git, use your Bitbucket username or Atlassian’s documented token username. For API requests using basic authentication, use your Atlassian account email.
    npm trusted publishing
    npm revoked classic tokens on December 9, 2025. Use npm login for an interactive session, trusted publishing for supported CI jobs, or a granular access token where the package settings allow it. Check separately whether the job needs credentials to install private dependencies.
    PyPI Trusted Publishing
    By January 1, 2024, password-only uploads no longer worked across PyPI. Keep two-factor authentication on your account and use Trusted Publishing or a project-scoped API token for uploads.

    Check. The chosen replacement supports the action and target you identified.

  3. Check against a test repository or package

    Run the intended operation with the replacement from the workflow you are testing. Read the private Bitbucket test repository or run the configured publish or staging action on the disposable npm package. For PyPI, configure TestPyPI separately and upload a test release there. Verify the repository read or look for the expected version in the target registry.

    Check. The provider returned the expected repository data, staged the intended release, or shows the expected package version.

  4. Update the live workflow after the test

    Review the production repository or package settings with its owner. Update stored credential references and verify each affected job before removing obsolete references. If a still-valid credential was exposed, revoke it with the provider and check which jobs need a replacement.

    Check. The workflow owner knows which jobs changed and where to renew or manage each replacement.

Check your result

Record the job, operation, expected destination, and provider result. Keep a record of any KeySigner approval separately from the Git request or registry result.

How to verify your setup

If you get stuck

The replacement is refused

For Bitbucket, check the username or email required by the client, the token scope, and access to the private repository. For a trusted publisher, compare the package’s publisher settings with the identity of the failing CI run. For PyPI, confirm the upload job and publisher both point to the intended registry.

Report a problem with this guide

Explore all setup guides →