@smbcloud / cli / commits / 325fe1d

Fix crates.io 403: add User-Agent header to curl requests

crates.io requires a User-Agent header; requests without one return 403. The polling loop and download curl for xcrs both lacked it, causing the release workflow to time out waiting for xcrs to appear on crates.io. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Seto Elkahfi committed Aug 2, 2026 at 17:30 UTC 325fe1ddf441e32d6364b8bcbd2820a2bd052217
1 file changed +2 -2
.github/workflows/release-mcp-registry.yml
+2 -2
@@ -126,7 +126,7 @@ jobs:
126 xcrs_server_name="$(jq -r '.name' server-xcrs.json)"
127 xcrs_version="$(jq -r '.version' server-xcrs.json)"
128 for attempt in $(seq 1 20); do
129 - if curl -fsSL "https://crates.io/api/v1/crates/xcrs/${xcrs_version}" >/dev/null; then
129 + if curl -fsSL -H "User-Agent: smbcloudXYZ/smbcloud-cli release-workflow" "https://crates.io/api/v1/crates/xcrs/${xcrs_version}" >/dev/null; then
130 echo "xcrs ${xcrs_version} is indexed on crates.io."
131 break
132 fi
@@ -138,7 +138,7 @@ jobs:
138 sleep 30
139 done
140
141 - curl -fsSL -o xcrs.crate \
141 + curl -fsSL -H "User-Agent: smbcloudXYZ/smbcloud-cli release-workflow" -o xcrs.crate \
142 "https://crates.io/api/v1/crates/xcrs/${xcrs_version}/download"
143 if ! tar -xOf xcrs.crate "xcrs-${xcrs_version}/README.md" | grep -q "mcp-name: ${xcrs_server_name}"; then
144 echo "xcrs ${xcrs_version} README is missing the 'mcp-name: ${xcrs_server_name}' marker." >&2