title: Correct global git config for personal access tokens in GitLab
body: <p><strong>The question</strong>: How do I set up my global user (I am assuming) .gitconfig to use the Personal Access Token in gitlab? Due to the other constraints of my coworkers and our repository, I believe this is the only way for it to work for everyone.</p>
  
  <p>E.g., this is how to use the personal access token in a cloned repository's remote config, and works:</p>
  
  <pre><code>[remote "origin"]
       url = https://gitlab-ci-token:[PERSONAL ACCESS TOKEN]@gitlab.com/path/to/repostiory.git
  </code></pre>
  
  <p>But how do we set up our global git config so that the token is automatic?  I am assuming there should be some key like</p>
  
  <pre><code>git config --global gitlab.[????somethingtoken????] [PERSONAL ACCESS TOKEN]
  </code></pre>
  
  <p>But for the life of me I can't find it anywhere or in any documentation. It seems like <code>gitlab.accesstoken</code> worked at one point in history, but they've changed their approach. neither <code>gitlab.ci-token</code> nor <code>gitlab.gitlab-ci-token</code> appears to work.</p>
  
  <p><strong>Caveats (that prevent obvious alternatives):</strong></p>
  
  <ol>
  <li>This isn't just an inconvenience - we use git submodules in which the origin url needs to be included in the parent repository, and so we literally cannot use the tokenized url because it will be shared with others in .gitmodules </li>
  <li>We have users working from home on Windows without SSH, and so we are confined to the https repository protocol and can't switch to ssh</li>
  </ol>
  
  <p>Thanks for your help/observations</p>