Embedding Username and Token in the URL to Access GitLab

This is an example of how to embed a username and private token when cloning a GitLab repository,

$ git clone https://myusername:glpat-mytoken@gitlab.com/myusername/myrepository.git

Leave a Comment

Your email address will not be published.