diff --git a/src/tutorials/git/token.md b/src/tutorials/git/token.md new file mode 100644 index 0000000..e2f27e7 --- /dev/null +++ b/src/tutorials/git/token.md @@ -0,0 +1,24 @@ +# Personal Access Tokens +## Assumptions +* [Git installed](https://git-scm.com/downloads) +* [Skynet / Forgejo account](https://forgejo.skynet.ie/user/login) + +### Why +The usual way of authentication when working with remote git repositories +is SSH, unfortunately we aren't able to do that with our git server. You could use username and password +however that is less secure and inconvenient, personal access tokens on the other hand are a more convenient and secure alternative. + +Personal access tokens make it so you don't have to use username / password +to authenticate, you can authenticate **once** when **cloning** and that's it. +### How +Go to [this page and click generate token](https://forgejo.skynet.ie/user/settings/applications) +Give it a name and select read and write for repository permissions +Copy it once its generated + +**Note : Do not share your access token with anyone, if its compromised delete it, this can be done easily +[here](https://forgejo.skynet.ie/user/settings/applications) and prevents it from being used.** + +When cloning a repository, use the token like so.. +```git clone https://@forgejo.skynet.ie/``` + +You now should be able to push to the repository without being prompted for username / password. \ No newline at end of file