docs: tutorial for pats
This commit is contained in:
parent
551bdb3165
commit
e2ac80381e
1 changed files with 24 additions and 0 deletions
24
src/tutorials/git/token.md
Normal file
24
src/tutorials/git/token.md
Normal file
|
@ -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://<token>@forgejo.skynet.ie/<repo>```
|
||||
|
||||
You now should be able to push to the repository without being prompted for username / password.
|
Loading…
Reference in a new issue