mirror of
https://gitea.com/gitea/tea.git
synced 2025-09-01 09:28:30 +02:00
README: Document logging in to gitea (#790)
References: #569 #675 #697 #767 #775 Reviewed-on: https://gitea.com/gitea/tea/pulls/790 Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com> Co-authored-by: Michal Suchanek <msuchanek@suse.de> Co-committed-by: Michal Suchanek <msuchanek@suse.de>
This commit is contained in:

committed by
techknowlogick

parent
5f35cebcf1
commit
ee111d7c12
16
README.md
16
README.md
@ -100,6 +100,22 @@ There are different ways to get `tea`:
|
||||
|
||||
5. asdf (thirdparty): [mvaldes14/asdf-tea](https://github.com/mvaldes14/asdf-tea)
|
||||
|
||||
### Log in to gitea from tea
|
||||
|
||||
gitea can use many different authentication schemes, and not every authentication method will work with every gitea deployment. When you are a gitea instance administrator you can tweak your settings to fit your use case. For the method that is most likely to work with any gitea deployment use the following steps:
|
||||
|
||||
1. Open the gitea web in a web browser
|
||||
|
||||
2. Do whatever it takes to log in to gitea in your web browser. Any MFA, IDP, or whatever else should be available this way.
|
||||
|
||||
3. In gitea settings generate an application token with at least **user read** permissions. If you want to do anything useful with the token add additional permissions/scopes.
|
||||
|
||||
4. Run `tea login add`, select **application token** authentication when asked for authentication type, and answer **yes** to the question if you have a token. Paste the generated token when asked for one.
|
||||
|
||||
You should now be logged in to your gitea instance from tea.
|
||||
|
||||
Since 0.10 gitea supports the much simpler oauth workflow but oauth may not be available on all gitea deployments, and gets much more complex when running tea on a remote system.
|
||||
|
||||
### Shell completion
|
||||
|
||||
If you installed from source or the package does not provide the completions with it you can add them yourself with `tea completion <shell>` command which is not visible in help. To generate the completions run one of the following commands depending on your shell.
|
||||
|
Reference in New Issue
Block a user