Creating secret with encrypted password

I created secret to access docker registry available in gitlab. Firstly my docker password is clear text and I could not find a method to use encrypted password. Secondly my deployment is failing as it is unable to pull the image from gitlab repo