Repository navigation
Commit d2e94b1
docs(auth): scope Bitbucket Cloud examples to api.bitbucket.org
Copilot review round 3 on #4629: both ready-to-paste Bitbucket Cloud
examples listed hosts=["api.bitbucket.org", "bitbucket.org"], but
Bitbucket Cloud splits its auth surface by host. Verified against
Atlassian's docs (support.atlassian.com/bitbucket-cloud/docs/
using-access-tokens/) and developer.atlassian.com/cloud/bitbucket/rest/,
plus a live probe (bitbucket.org/.../raw/... varies its response on the
`authorization` header, consistent with HTTP Basic, not Bearer):
- api.bitbucket.org accepts Bearer access tokens and Basic with an
Atlassian API token on any REST call.
- The plain bitbucket.org web host (raw links, git-over-HTTPS) does not
accept either — it authenticates via HTTP Basic with the literal
username x-token-auth and the access token as the password, a
different credential shape than either documented example produces.
Restrict both examples' `hosts` to `api.bitbucket.org`, and point catalog
fetches at the API's `/2.0/repositories/<ws>/<repo>/src/<ref>/<path>`
form instead of `bitbucket.org/.../raw/...`, so the credential in
auth.json actually authenticates the request it's attached to. No code
changes — the provider already implements both schemes correctly; only
the documented host scope was wrong.
Assisted-by: Claude Code (model: claude-sonnet-5, human-supervised)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 2317f90 commit d2e94b1
1 file changed
Lines changed: 19 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
150 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
151 | 162 | | |
152 | 163 | | |
153 | 164 | | |
154 | 165 | | |
155 | 166 | | |
156 | | - | |
| 167 | + | |
157 | 168 | | |
158 | 169 | | |
159 | 170 | | |
160 | 171 | | |
161 | 172 | | |
162 | 173 | | |
163 | 174 | | |
164 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
165 | 179 | | |
166 | 180 | | |
167 | 181 | | |
168 | 182 | | |
169 | 183 | | |
170 | | - | |
| 184 | + | |
171 | 185 | | |
172 | 186 | | |
173 | 187 | | |
| |||
0 commit comments