diff --git a/crates/uv-cli/src/lib.rs b/crates/uv-cli/src/lib.rs
index 8f77936ad..1ea7b55b1 100644
--- a/crates/uv-cli/src/lib.rs
+++ b/crates/uv-cli/src/lib.rs
@@ -4449,7 +4449,8 @@ pub struct DisplayTreeArgs {
#[arg(long)]
pub no_dedupe: bool,
- /// Show the reverse dependencies for the given package. This flag will invert the tree and display the packages that depend on the given package.
+ /// Show the reverse dependencies for the given package. This flag will invert the tree and
+ /// display the packages that depend on the given package.
#[arg(long, alias = "reverse")]
pub invert: bool,
}
@@ -4463,9 +4464,10 @@ pub struct PublishArgs {
#[arg(default_value = "dist/*")]
pub files: Vec,
- /// The URL of the upload endpoint.
+ /// The URL of the upload endpoint (not the index URL).
///
- /// Note that this typically differs from the index URL.
+ /// Note that there are typically different URLs for index access (e.g., `https:://.../simple`)
+ /// and index upload.
///
/// Defaults to PyPI's publish URL ().
///
diff --git a/crates/uv-publish/src/lib.rs b/crates/uv-publish/src/lib.rs
index f85643b03..8a90a8952 100644
--- a/crates/uv-publish/src/lib.rs
+++ b/crates/uv-publish/src/lib.rs
@@ -81,8 +81,12 @@ pub enum PublishSendError {
ReqwestMiddleware(#[from] reqwest_middleware::Error),
#[error("Upload failed with status {0}")]
StatusNoBody(StatusCode, #[source] reqwest::Error),
- #[error("Upload failed with status code {0}: {1}")]
+ #[error("Upload failed with status code {0}. Server says: {1}")]
Status(StatusCode, String),
+ #[error("POST requests are not supported by the endpoint, are you using the simple index URL instead of the upload URL?")]
+ MethodNotAllowedNoBody,
+ #[error("POST requests are not supported by the endpoint, are you using the simple index URL instead of the upload URL? Server says: {0}")]
+ MethodNotAllowed(String),
/// The registry returned a "403 Forbidden".
#[error("Permission denied (status code {0}): {1}")]
PermissionDenied(StatusCode, String),
@@ -577,18 +581,32 @@ async fn handle_response(registry: &Url, response: Response) -> Result ResultThis setting has no effect when used in the uv pip interface.
---publish-url publish-urlThe URL of the upload endpoint.
+--publish-url publish-urlThe URL of the upload endpoint (not the index URL).
-Note that this typically differs from the index URL.
+Note that there are typically different URLs for index access (e.g., https:://.../simple) and index upload.
Defaults to PyPI’s publish URL (<https://upload.pypi.org/legacy/>).