I keep my development on a personal GitLab server. In my CI/CD script, I want to push the repository to a public GitHub repo when a new tag is created.
The CI/CD runs in an ephemeral Docker container, so there are no credentials stored. I can however add secrets in GitLab, but I don't know what git command I would use to log in to GitHub pragmatically.
I have tried git push https://usesrname:password@github.com/myrepo
but that gives me an Authentication failed error.
Any ideas?