Commit da2ab02
fix: allow re-registration when local config is stale or --force is set
After uninstalling ggo on Linux, ~/.gpugo/config/config.json persists,
causing 'ggo agent register' to always fail with "already registered".
Fix: before blocking, verify the agent still exists on the server.
- If the server returns an error (agent deleted/missing), treat the local
config as stale, clean it up automatically, and proceed with registration.
- If the agent is still live on the server, keep blocking but improve the
error message to mention 'ggo agent unregister' or --force.
- Add --force flag to explicitly replace an existing registration: deletes
the old agent from the server and clears local config before re-registering.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent c68f725 commit da2ab02
1 file changed
Lines changed: 41 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
| |||
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
159 | | - | |
160 | | - | |
161 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
162 | 199 | | |
163 | | - | |
164 | 200 | | |
165 | 201 | | |
166 | 202 | | |
| |||
203 | 239 | | |
204 | 240 | | |
205 | 241 | | |
| 242 | + | |
206 | 243 | | |
207 | 244 | | |
208 | 245 | | |
| |||
0 commit comments