Git Tut

12

Git for GitHub

To avoid having to enter a password every time you do push/merge/rebase, you can use

git remote set-url origin https://username:<MYTOKEN>@github.com/username/reponame.git

Highly recommend read this article about personal token on GitHub.

Similarly, for clones in Github private repos or with access permissions, you have to use personal token. git clone first and enterwith username and personal token to complete the clone steps. Or you can clone by using

git clone https://username:<TOKEN>@github.com/username/reponame.git

By using second method, you achieve the same effect as git remote set-url origin https://username:<MYTOKEN>@github.com/username/reponame.git