Cargo publish times out without failure
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 15.5k
- Forks
- 3k
- Avg merge
- 23h 30m
- Merged PRs (30d)
- 51
Description
Problem
When trying to publish a crate, we recently experienced an issue reported here. The command cargo publish timed out without returning an error.
Steps
This may be not repeatable without hacking the cargo publish network communication. Our guess is that the crates.io server is currently experiencing some issue.
There is the GitHub CI recipe that failed (problem occurs on the cargo publish --token $CRATES_IO part):
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Dump context for debug
uses: crazy-max/ghaction-dump-context@v1
- uses: actions/checkout@v1
- name: Publishing - dry run
if: inputs.publish == false
run: |
cargo publish --dry-run
- name: Publishing
if: inputs.publish == true
run: |
echo "[registry]" > ~/.cargo/credentials
echo "token = \"$CRATES_IO\"" >> ~/.cargo/credentials
cargo publish --token $CRATES_IO
env:
CRATES_IO: ${{ secrets.CRATES_IO }}
- name: Release
if: inputs.publish == true
uses: softprops/action-gh-release@v1
Below is the screenshot of a local attempt to run cargo publish --allow-dirty.

Possible Solution(s)
Return with an error upon time out.
Notes
No response
Version
cargo 1.68.0-nightly (985d561f0 2023-01-20)
release: 1.68.0-nightly
commit-hash: 985d561f0bb9b76ec043a2b12511790ec7a2b954
commit-date: 2023-01-20
host: x86_64-unknown-linux-gnu
libgit2: 1.5.1 (sys:0.16.1 vendored)
libcurl: 7.86.0-DEV (sys:0.4.59+curl-7.86.0 vendored ssl:OpenSSL/1.1.1q)
os: Ubuntu 22.10 (kinetic) [64-bit]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the provided GitHub CI recipe and reproduce the failure around cargo publish --token $CRATES_IO, comparing it with cargo publish --dry-run and the local --allow-dirty attempt. Trace the publish timeout behavior and verify that a timed-out publish returns an error instead of hanging or completing silently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100