Migration en INRAE
Modification de l'url du dépôt distant
Allez dans votre projet Git (ici howtogitlab.wiki).
cd monprojet
Pour otenir la liste des dépôts distants à renommer:
git remote -v
> git remote -v
# retourne pour le projet howtogitlab.wiki (en ssh)
# nom du dépôt distant et son URL
origin git@gitlab.paca.inra.fr:biosp/howtogitlab.wiki.git (fetch)
origin git@gitlab.paca.inra.fr:biosp/howtogitlab.wiki.git (push)
# ou (si vous êtes en https)
origin https://gitlab.paca.inra.fr/biosp/howtogitlab.git (fetch)
origin https://gitlab.paca.inra.fr/biosp/howtogitlab.git (push)
On va modifier le dépôt distant origin pour qu'il pointe sur la nouvelle URL en INRAE [gitlab.paca.inrae.fr].
# git remote set-url <nom_du_depot_distant> <git@gitlab.paca.inrae.fr:<namespaces>/nom_du_projet>.git
# git remote set-url <nom_du_depot_distant> <https://gitlab.paca.inrae.fr/<namespaces>/nom_du_projet>.git
> git remote set-url origin git@gitlab.paca.inrae.fr:biosp/howtogitlab.wiki.git
Vérification des modifications:
> git remote -v
# retourne pour le projet howtogitlab.wiki (en ssh)
origin git@gitlab.paca.inrae.fr:biosp/howtogitlab.wiki.git (fetch)
origin git@gitlab.paca.inrae.fr:biosp/howtogitlab.wiki.git (push)
# ou (si vous êtes en https)
origin https://gitlab.paca.inrae.fr/biosp/howtogitlab.git (fetch)
origin https://gitlab.paca.inrae.fr/biosp/howtogitlab.git (push)
`
Note : origin est le dépôt distant par defaut, il faudra effectuer la même manipulation pour tout autres dépôts.