gleam-lang/gleam
View on GitHubUnable to provide alternative hexpm credentials for `gleam publish`
Open
#4,318 opened on Mar 9, 2025
good first issuehelp wanted
Description
If you have already authenticated and saved a local token for Gleam to interact with the hex api, it is impossible to provide alternative user/pass credentials when publishing a package.
Attempting to publish a package by setting HEXPM_USER and HEXPM_PASS variables results in the following error:
error: Failed to decrypt data
A problem was encountered decrypting data.
The error from the encryption library was:
Decryption failed
Steps to reproduce:
- Generate a local hex token for a hexpm account using
gleam hex authenticate - Run
HEXPM_USER=a_different_account HEXPM_PASS=****** gleam publish - Observe the error above.