Registry login via config.json

I’m trying to figure out if there is a way to add multiple auth creds for same private registry in config.json. Write now if I do that it takes into consideration only the last entry and ignores the first probably because the taret registry is same. Can somebody suggest a better way to do this. My goal is that both the users should be authenticated against the target registry server.