gitgithubgitlabmulti-user

How can I have multiple git accounts on a single development machine?


I am trying to work simultaneously on more than one (two or three) GitLab (or even GitHub) projects on a single development machine. Because upon configuration the IDEs and the git service has the data of my primary user when I try to checkout or clone another project with a different username / password the system says either project is not found or I do not have permissions to do that.

How can I configure and use more than one git user on a single development machine?


Solution

  • You can store your credentials in each project using.

    git config credential.helper store
    git push origin HEAD
    write user and password
    

    Go to the project folder and type the git commands.