This is weird but this is how I do it!
I have a repository on Github but I wanted to use the Gitlab CI, so I mirrored the repository from Github to Gitlab, then I configured the CI etc... I was looking around online, and I found that with Gitlab Enterprise you have the feature of pushing changes to an external repository from GitLab, but since I don't pay for Gitlab Enterprise, I did the following:
Since we are using GIT, and we are good programmers try to be good programmers make it work, so:
I JUST EDITED THE GIT URL
How was it?
-
Clone your repository
-
Go to your project ...
-
Navigate to
.git>configand you should have something like this!
Change the URL from Github to Gitlab (I had the same username and project name, in both services so, I only changed the URL).
Then with the Gitlab URL:
git pull origin
Since the remote URL have changed, you should get the changes from Gitlab.
- Change again your remote URL back again to Github
- Then push your changes
git pull origin
You should be done! Hope the trick works for you, it did work for me, so.. 🧐
