As of Sept 9, 2025, app passwords can no longer be created. Use API tokens with scopes instead. All existing app passwords will be disabled on June 9, 2026. Migrate any integrations before then to avoid disruptions.
My question is: Anyone managed to get Vercel's CI working with API Tokens and pnpm? If so, how?
Vercel Staff
Hi, thanks for raising the issue! We have updated the docs with a proper flow for Bitbucket
I'm assuming that by default pnpm "prefers" to use SSH. Since locally I have my SSH keys configured, it works without any issues and pnpm is able to clone the repo which is then registered in the lockfile with SSH URL. This happens even if I explicitly add the repo with HTTPS URL.
This is problematic in 2 ways:
it exposes the token in package.json
it won't work at Vercel's CI/CD because pnpm will look at the lockfile and try to clone via SSH which is not configured in Vercel's environment.
The solution I've come up with is to use pnpmfile.cjs and a preResolution hook (docs) to modify the lockfile before installation. The idea is to check if the repo can be accessed via SSH, and if not, modify the resolution to use HTTPS with access token.
This works locally and in Vercel's CI/CD.
In the scenario that I'm working on, our NextJs-based project depends on a private Bitbucket repo called main-dependency-package which in turn depends on another private Bitbucket repo called sub-dependency-package. So the pnpmfile.cjs modifies the resolution of both packages.
The only thing that need to be set in the environment are the access tokens for both repos: