Commit 77244bd
fix(keygen): call /auth/cli/ssh-key instead of /users/me (2.4.5) (#19)
`cf keygen` was trying to auto-register the generated SSH public key via
`PUT /users/me`, but that route is only wired on the internal backend.
Hitting api.chipfoundry.io produced an `HTTP 404: Not Found` that looked
like a CLI bug and leaked through `_api_put`'s error printer before the
friendly "To register this key" fallback, confusing users.
Switch `_try_register_ssh_key` to the new CLI-native endpoint
`PUT /api/v1/auth/cli/ssh-key` on the public API (see backend PR), and
swallow transport errors silently so the manual-registration
instructions are the only thing the user sees when auto-registration
is unavailable (e.g. not logged in, older backend, offline).
Made-with: Cursor
Co-authored-by: jdicorpo <jdicorpo@gmail.com>1 parent e5e5a9b commit 77244bd
2 files changed
Lines changed: 21 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
209 | 212 | | |
| 213 | + | |
| 214 | + | |
210 | 215 | | |
211 | 216 | | |
212 | 217 | | |
| 218 | + | |
213 | 219 | | |
214 | | - | |
215 | | - | |
| 220 | + | |
216 | 221 | | |
217 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
218 | 235 | | |
219 | 236 | | |
220 | 237 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments