-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a way to generate access token from the CLI for automation purpose #17721
Comments
You can't actually use an access token to generate an access token - you have to use BASIC authentication and the user's password. Is that not acceptable? |
Oh right (and I even read that part of the doc twice). But in my case, I use U2F for the 2FA, so I can't use that (or it would be a security issue if I could bypass the 2FA). And while I could create a admin user without 2FA just to have a access token, I think this would be reducing the security |
If you can run |
I am sorry, I do not understand the comment. I agree, the security problem is not being able to run |
* Add a "admin user generate-access-token" subcommand Fixes #17721 * Update cmd/admin.go Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> * Update cmd/admin.go Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> * Fix code to match new interfaces Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Add a "admin user generate-access-token" subcommand Fixes go-gitea#17721 * Update cmd/admin.go Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> * Update cmd/admin.go Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> * Fix code to match new interfaces Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
Feature Description
It would be useful to me to be able to get a access token for a user in a way that would be easier to use by a external program (eg, automation with ansible or something else).
The current options to get a token are:
So I would propose to add a subcommand to the admin user command:
Screenshots
No response
The text was updated successfully, but these errors were encountered: