killercup / killercup/cargo-edit

cargo upgrade returns 401 consistently even after changing registry token

Open
#931 14 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cargo-upgrade
Dominant language
Rust
Stars
3.5k
Forks
166
PR merge metrics
No merged PRs in 30d

Description

% cargo upgrade                            
    Checking virtual workspace's dependencies
Error: status code '401 Unauthorized': the request was not authorized

cargo upgrade --verbose dont seem to give any extra details on the error.

Tried the following:

  1. removing all cache
  2. renewing the token in config.toml
  3. cargo search --registry internal-registry-name internal-feature works fine with the token enabled
  4. other cargo commands like cargo clean, cargo build, cargo test all work fine

This was working fine for many months and seeing this issue only the last couple months now.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing cargo upgrade with the internal registry and the token in config.toml, then compare its authentication behavior with cargo search --registry internal-registry-name and the working build and test commands. Trace the cargo upgrade entry point until the source of the 401 is identified; done means dependency upgrades work with the configured registry token and the failure is no longer reproducible.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
authentication, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.