# Replace retired credentials for Bitbucket, npm, and PyPI

[Read this guide on KeySigner](https://keysigner.io/integrations/guides/replace-retired-developer-credentials/)

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.

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

### What stopped working and what to use

- **[Bitbucket Cloud API tokens](https://support.atlassian.com/bitbucket-cloud/docs/using-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](https://docs.npmjs.com/trusted-publishers/)**. 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](https://docs.pypi.org/trusted-publishers/)**. 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.

## 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](https://keysigner.io/integrations/verify-a-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.

## Tools in this guide

- [Bitbucket](https://keysigner.io/integrations/bitbucket/)
  - [Check requirements for signed commits](https://support.atlassian.com/bitbucket-cloud/docs/require-signed-commits)
- [npm](https://keysigner.io/integrations/npm/)
  - [Review trusted publishers](https://docs.npmjs.com/trusted-publishers/)
- [PyPI](https://keysigner.io/integrations/pypi/)
  - [Review trusted publishing on PyPI and TestPyPI](https://docs.pypi.org/trusted-publishers/)
  - [Add a trusted publisher to an existing PyPI project](https://docs.pypi.org/trusted-publishers/adding-a-publisher/)
  - [Set up authenticator codes for PyPI](https://docs.pypi.org/your-account/two-factor-authentication/#authentication-application-totp)

## Setup instructions

- [Bitbucket Cloud app password retirement schedule](https://community.atlassian.com/forums/discussion/3237429/deprecation-notice-bitbucket-cloud-app-password-brownout-schedule-and-next-steps)
- [npm classic token revocation notice](https://github.blog/changelog/2025-12-09-npm-classic-tokens-revoked-session-based-auth-and-cli-token-management-now-available/)
- [PyPI two-factor enforcement notice](https://blog.pypi.org/posts/2024-01-01-2fa-enforced/)
- [Troubleshoot PyPI publishing](https://docs.pypi.org/publishing/troubleshooting/)
- [Review a GitHub Actions release to npm](https://keysigner.io/integrations/guides/github-actions-and-npm/)
- [Rehearse a TestPyPI release from GitLab](https://keysigner.io/integrations/guides/publish-to-pypi-from-gitlab/)
- [Check Bitbucket merge approvals](https://keysigner.io/integrations/guides/check-code-merge-approvals/)

[More guides for this task](https://keysigner.io/integrations/tasks/review-code-and-releases/)
