This script helps create a global credential in jenkins from a key source that is located in jenkins master.
You can change the name of key to whatever key exists on master.
Run this script either:
i) Jenkins-> manage Jenkins -> script console
ii) add to init.groovy to make it run during jenkins start