Docker needs to authenticate to GitLab before it can push images to registry. If you are running it in a Pipeline job this is usually done by setting DOCKER_AUTH_CONFIG as described here.
If you are using Docker command locally or from some shared server, you need to login as well. docker login registry.gitlab.com and use your username and token.
You can get better answer if you describe your setup in more details.
I was thinking the same was not 100% sure. We are running YML scripts in DEVOPS that will create the images. The username & password is stored in DEVOPS and is encrypted when passed to the scripts. Problem now is I cannot test the login manually. But we have the URL where it is trying to push the image too. Whom can assist me in tracing the login account being used and reset the password? As mentioned, the previous developers left our company and country, so we are stuck. I’m desperate for a solution?
Hi Balonik, before I asked for more info in the Microsoft forums, Who can assist us to recover the username and/or password? Currently the credentials is in a DEVOPS register and is encrypted.
We are trying to access the gitlab account but cannot. This will perhaps help us in generating a new access token to be used - think the current one has expired.
Ok, this is the part that I do not know how to do it - I’m very new to gitlab.
On a high-level
1)Do I create a new project with new registry?
2) Then generate a token with new username and password and expiry date and copy this into the Docker json file?
If you push only to single project, navigate to that project in GitLab. If you push into more projects, navigate to a group where all the projects are.
In the left pane select Settings → Access Tokens. There you can add new token. For docker push you need to grant “write_registry” scope and “Developer” role.
You get a token that you need to save somehow in your Azure DevOps pipeline.