git remote add github <your-github-url> # create a remote for GitHub git remote add gitlab <your-gitlab-url> # create another remote for GitLab git push -u github <local_branch_name> # set the default upstream to GitHub
If you want to change your remote URL from GitLab to GitHub:
git remote set-url origin <your-github-url> # use GitHub as your (only) origin
If you want to use both GitHub and GitLab:
git remote add github <your-github-url># create a remote for GitHubgit remote add gitlab <your-gitlab-url># create another remote for GitLabgit push -u github <local_branch_name># set the default upstream to GitHubIf you want to change your remote URL from GitLab to GitHub:
git remote set-url origin <your-github-url># use GitHub as your (only) originWarning: Your
git push http://...command should instead usehttps!nice catch
In github action:
uses: wangchucheng/git-repo-sync@v0.1.0
is this gitlab or github username and version?
gitlab
From where to get the version of the project
I tried repo -> settings -> repository -> repository mirroring, for which i found the documentation in the gitlab doc, but i'm getting this error:
remote Support for password authentication was removed on August 13, 2021
for this error I found a blogpost here. Is there no better way to mirror repos nowadays than to clone and then push all of them?
Thanks a lot, work like a charm
For the TARGET_TOKEN variable in method 1 github to gitlab, is the token the Personal or project access token?
I'm using Personal in this case, not sure if there Project Access Token
Thanks a lot!