DRYing up creation of X-Registry-Auth header