Use Gitlab access token

How to use a Gitlab access token ?

Open .gitconfig and add theses lines :

[url "https://oauth2:YOURTOKEN@gitab.instance.com/username/repository.git"]
    insteadOf = https://gitlab.instance.com/username/repository.git