Clone a private repo of github with username and password

后端 未结 2 873
心在旅途
心在旅途 2021-01-31 04:18

I have configured Account A on my system with Global configurations and I can clone all my repos from there.

Now I don\'t want to change the configuration and I want to

2条回答
  •  攒了一身酷
    2021-01-31 04:30

    Just to make the syntax a bit clearer, to clone a private repository use:

    git clone https://[insert username]:[insert password]@github.com/[insert organisation name]/[insert repo name].git
    

    Example:

    git clone https://myusername:mypassword@github.com/myorgname/myreponame.git
    

提交回复
热议问题