I'm relatively new to this use of git. The question is:
if I have a local repository, cloned from a remote repository in gitlab, and I want to stop using that gitlab account and use another one, when trying to delete in the local repository with:
$ git remote remove origin
and I add the other remote repository with:
$ git remote add origin2 https://gitlab.com/otro_usuario/otro_repositorio.git
all good. It should be noted that I already have the remote repository created in the other account I want to use. But when I try to upload the local repository to that remote repository added or created new (I already tried to bore the origin, and I also tried leaving it and adding the origin2) it gives me the following error when trying to do the push:
$ git push origin2
remote: The project you were looking for could not be found.
fatal: repository 'https://gitlab.com/otro_usuario/otro_repositorio.git/' not found
Checking the remote repositories associated with the local repository gives me the following list:
$ git remote -v
origin https://gitlab.com/usuario_original/repositorio_original.git (fetch)
origin https://gitlab.com/usuario_original/repositorio_original.git (push)
origin2 https://gitlab.com/otro_usuario/otro_repositorio.git (fetch)
origin2 https://gitlab.com/otro_usuario/otro_repositorio.git (push)
What am I doing wrong, what is missing, or what I want to do is not possible (keep the change history that I have already made in that repository, but stop using that gitlab account and use another one from the same gitlab) ?