I want to login to Docker Registry in Gitlab.com using Ansible play, but how do I get Docker Registry username and password in gitlab?
Is it same as gitlab.com username and password?
Registry credentials in GitLab are the same as the repositories they belong to. So, you can use your GitLab.com username and password.
That said, you should probably create a personal access token with only read_registry
permissions to use with Ansible, instead of literally using your account credentials, to limit what Ansible can do. And, you can revoke the token if it leaks.
Documentation: Personal access tokens