N
Novu2w ago
Gurami

Sync code-first workflows between environments

Hey everyone, I’m running into an issue with syncing environments in Novu. I initially set up a new Novu project using the development environment key. Now, I’m trying to sync changes to the Production environment. When I try using the CLI (with the production key and the production bridge URL in the command), I get this error: Signature does not match the expected signature. Please ensure the signature provided in the 'novu-signature' header is correct and try again. Additionally, Novu Studio seems to have cached the development environment key, and I can’t sync from Studio (local) either. Even after updating the environment file to use the production key, it looks like Studio still holds onto the old dev key somewhere. How can I sync changes between environments locally — and is there a way to clear Novu’s cache (for both the CLI and Studio) to reset the environment keys properly? Thanks in advance! 🙌
7 Replies
Pawan Jain
Pawan Jain2w ago
@Gurami Did you restart the servr after updating the secret key in env file? To sync the workflows using CLI, you need to use --secret-key value. Are you sure you are you are using correct secret key?
Gurami
GuramiOP2w ago
Hey @Pawan Jain Sure, I restarted the server. When using the CLI, I’m in the root bridge project, and the key is correct — it’s from the production environment. npx novu@latest sync \ --bridge-url {url} \ --secret-key {key} \ --api-url https://eu.api.novu.co If I specify the secret key from the development environment, it syncs and updates the bridge URL to development. However, production is not syncing.
Pawan Jain
Pawan Jain2w ago
@Gurami I will check it from my end and update you
Gurami
GuramiOP2w ago
@Pawan Jain Thank you 🙏 @Pawan Jain Update: I specified my local Studio URL as my tunnel URL, and then it synced changes to production (using the CLI with the production key). Development doesn’t require that tunnel update — it only needs the private key.
Novu_Bot
Novu_Bot2w ago
@Gurami, you just advanced to level 1!
Pawan Jain
Pawan Jain2w ago
@Gurami Thanks for the update. Any specific reason you were using locla studion to sync to production environment?
Gurami
GuramiOP2w ago
Its in active development and I was just experimenting.

Did you find this page helpful?