Deploying to package registry in self-hosted GitLab instance

See this for solution, which worked for me.