Adding authentication to private registry

I need to add authentication to my private registry and have been unable to do so. I tried what was in the official docker documentation but could not get that to work for some reason.

Does anyone have any tips or suggestions?