Skip to the content
aSecretSign in

Before retiring a machine, export the identity that owns your project credentials. Restoring that identity on the replacement lets a new process use the same named keys.

Make an export while the old machine works

In a private directory outside the repository, run the following commands. Record the agent ID shown by the first one so you can compare it after the move.

asecret me
asecret key --export --out reporting-agent.json

The export contains the agent ID, its encryption keys, and the access token that lets it act as that agent. Keep it in protected storage you can reach if the laptop fails. If you rotate the agent’s access token later, make a new export under a new filename. Earlier exports still contain the old token. CLI credentials and token rotation

Verify the replacement before retiring the original

Install the aSecret CLI on the replacement machine. Transfer the export privately, then run the restore from its directory under the user account that will run the report.

asecret connect --restore reporting-agent.json
asecret me
asecret list

Compare the agent ID with the one you recorded. The list should show the names you expect. For the final check, run the reporting command through asecret run and check its usual output. A completed report gives you evidence that the recovered agent can actually use the key. Connecting an existing agent

Browser recovery for your user

Agent recovery gives you another option if you need an individual saved value. Enable it under Recovery while the agent is linked and available. Follow the setup to keep your recovery key somewhere you can still access if you lose the laptop. Run asecret me on the linked machine and check the agent’s page for confirmation that it shared its key.

If the laptop later fails, sign in, open Agents, choose the reporting agent, and select Reveal beside the secret. A different browser can use the recovery key you saved. Browser recovery depends on the agent having shared its encrypted key before the loss. If neither an export nor that recovery path is available, arrange a replacement API key with its provider. How agent recovery works