> For the complete documentation index, see [llms.txt](https://til.kurianbenoy.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://til.kurianbenoy.com/git-github/one-time-setting-to-easily-use-github.md).

# one time setting to easily use Github

I find typing password/remembering tokens hard. So I have been a big fan of setting up ssh keys or the recent trick I found from my colleague Shuhaib.

To clone a repo:

```
git clone https://<MYUSERNAME>:<MYTOKEN>@github.com/scuzzlebuzzle/ol3-1.git
```

You can set remote like this way:

```
git remote set-url origin https://<MYUSERNAME>:<MYTOKEN>@github.com/scuzzlebuzzle/ol3-1.git
```

**References:**

<https://stackoverflow.com/questions/18935539/authenticate-with-github-using-a-token>
