Now Pega MashUp is a channel. So you cannot just use generated MashUp code on all environments, you need to move the channel as well. Otherwise you will have a security error exception.

For this you need to associate instance of DATA-CHANNEL-MASHUP with your app RuleSet.

Source