I moved a repo from github to gitlab. In the process the main remote repo went from the default “origin” to a custom name in a private repo so the config file in .git now, in part, looks like this:
[remote "origin"] fetch = +refs/heads/*:refs/remotes/origin/* [remote "RepoSourceName"] url = email@example.com:MyName/MyRepo.git fetch = +refs/heads/*:refs/remotes/RepoSourceName/*
However go get is trying to access “origin” which no longer exists instead of RepoSourceName. Does anyone know how to make it access RepoSourceName?
I could probably make the gitlab repo origin to solve this but it seems I should also learn how to make go always use the remote “source” I want instead of always defaulting to origin.
I’m assuming once I have this resolved I can just do a global search and replace in my code from the github URL of my project to the gitlab URL it is now on and it should all work again.