Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • 6
    Interesting use of http.extraheader. +1 Commented Aug 29, 2017 at 10:45
  • 70
    will --global also send your private token to other git server in case you using many repo? any secure risk? Commented Aug 29, 2017 at 15:06
  • Anyone any review on that? I think it will send it to public github repo when we do go get on them Commented May 30, 2020 at 11:45
  • 10
    There is another option where you send token only to your gitlab - but I am not sure this is encoded. git config --global url."https://${user}:${personal_access_token}@mygitlab.com".insteadOf "https://mygitlab.com" Commented Sep 10, 2020 at 15:25
  • 1
    I think @S.R solution is best (even though I had to add a trailing slash to the first url to make it work for my case => [...] url."https://${user}:${personal_access_token}@mygitlab.com/".insteadOf [...] Commented Apr 16, 2021 at 15:10