Set up Personal Access Token for GitLab

  1. In GitLab click on the Avatar icon in the top right corner and click on Edit profile
  2. Then in the left hand menu, click on Access->Personal access tokens
  3. Next,click on the Generate token button on the right hand side.In the drop down select Legacy token.
  4. Create a token with a name, write_repository and read_repository scopes, and an expiration date.
  5. Click Generate Token and Copy the token somewhere safe — it’s shown only once. Paste this in as the “password” whenever Git asks for credentials.